Repository navigation
Diagnostic Logging
There are a number of places where specialized logging can be enabled. This is primarily for debugging purposes, and enabling these logs will have a performance impact.
This logs the contents of the analysis queue as items are enqueued and processed. The output is CSV and may produce hundreds of megabytes per second.
To enable, set HKCU\Software\Microsoft\PythonTools\15.0\Analysis\StandardLibrary@LogPath to the path to write the log to, or if directly invoking Microsoft.PythonTools.Analyzer.exe pass the /diag option.
These log JSON-RPC messages sent between the IDE and other processes. To enable, create a DWORD values 1 in HKCU\Software\Microsoft\PythonTools\ConnectionLog for one of the below items. The logs will be created in %TEMP%.
-
Analyzer- messages from the out-of-proc analyzer to the IDE -
ProjectAnalyzer- messages from the IDE to the out-of-proc analyzer -
TestExecutor- messages from the test executor to the testee -
DebugConnection- messages from the IDE to the debuggee
These log various messages from within the IDE or a child process. To enable, create a DWORD value 1 in HKCU\Software\Microsoft\PythonTools\Logging
-
AnalyzerTrace- increases the level of trace messages sent from the analyzer (these appear in theAnalyzerconnection log) -
BufferInfo- messages from the text buffer to a text file in%TEMP%
This logs AST analysis (new-style analysis) info. By default, verbose messages are logged in debug builds and info messages are logged in release builds.
TODO: There is currently no way to adjust this without rebuilding.
Logs are written to AnalysisLog.txt in the environment's database directory. They can be viewed by collecting diagnostic info.
Some unhandled exceptions are written to the system event log. These can be viewed by collecting diagnostic info.
In debug builds, all unhandled or unobserved exceptions trigger assertions. In test runs, all NullReferenceException and ObjectDisposedException are logged to the event log as warnings.
- Documentation on docs.microsoft.com
- PTVS Project
- Development topics
- Additional resources
- wfastcgi (on PyPI)
- Video index; note that some videos are outdated.