Debugging in a nutshell
General Setup
The _NT_SYMBOL_PATH
environment variable is used by many IDEs, editors and debuggers for setting your symbol servers and caches for debugging third party code.
This value…
Microsoft.Playwright.PlaywrightException: Error: The language "cmd" has no grammar.
at Object.highlight (http://127.0.0.1:41899/main.js:3978:11)
at eval (eval at evaluate (:226:30), :2:18)
at UtilityScript.evaluate (:233:19)
at UtilityScript. (:1:44)
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwnerBase object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 209
at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 535
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in /_/src/Playwright/Core/Frame.cs:line 548
at SiteGen.Extensions.Markdown.Prism.PrismHost.Highlight(String source, String language)
at SiteGen.Extensions.Markdown.Prism.PrismCodeBlockRenderer.Write(HtmlRenderer renderer, PrismCodeBlock obj)
...will configure the following symbol servers:
- Microsoft Symbol Server (e.g. Windows OS symbols) (http://msdl.microsoft.com/download/symbols)
- Microsoft NuGet Symbol Server (https://nuget.smbsrc.net)
- Microsoft .NET Symbols (http://referencesource.microsoft.com/symbols)
- Microsoft .NET Core Symbols (https://dotnet.myget.org/F/dotnet-core/symbols)
... while making use of a SymbolCache directory under your user profile's %TEMP%
directory.
Set using cmd.exe
:
Microsoft.Playwright.PlaywrightException: Error: The language "cmd" has no grammar.
at Object.highlight (http://127.0.0.1:41899/main.js:3978:11)
at eval (eval at evaluate (:226:30), :2:18)
at UtilityScript.evaluate (:233:19)
at UtilityScript. (:1:44)
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwnerBase object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 209
at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 535
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in /_/src/Playwright/Core/Frame.cs:line 548
at SiteGen.Extensions.Markdown.Prism.PrismHost.Highlight(String source, String language)
at SiteGen.Extensions.Markdown.Prism.PrismCodeBlockRenderer.Write(HtmlRenderer renderer, PrismCodeBlock obj)
Launching debugger at program startup
Configure a Debugger
string value under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options\appname.exe
(where appname.exe
is your application name) to automatically
launch a debugger and attach it to the process, no matter how the application is launched.
The Debugger
value should be the path to your preferred debugger, including command-line arguments.
If you wish to use Visual Studio, you only need to use vsjitdebugger.exe
as the Debugger
value. The Visual Studio Just-In-Time Debugger is usually installed in the System32 (64 bit) and SysWOW64 (32 bit) folders and thus available on the system path.
PerfView
WinDBG
Debug Diagnostics
Debug Diagnostic Tool v2 Update 3.1 is the latest version, available to download from Microsoft:
C/C++ Code
Allow debugging optimized code
Debugging optimized Visual C++ code was difficult to impossible in some cases, even in the most simple of programs. This can be enabled with a previously undocumented and now official flag.
Visual C++ 2012: Undocumented compiler flag /d2Zi+
Visual Studio 2013 Update 3 or higher: Officially supported flag: /Zo
(zed-oh) 1
.NET
CLI_DEBUG=1