-
Notifications
You must be signed in to change notification settings - Fork 458
How to Capture Unhandled SQL Tools Service Exceptions
Karl Burtram edited this page Nov 30, 2016
·
2 revisions
- Launch VS Code with mssql extension installed
- Determine the process ID for the Microsoft.SqlTools.ServiceLayer process. For example, this can be done with Task Manger on Windows or “ps –ef | egrep SqlTools” on Linux\Mac. This needs to happen before step 3 since each VS Code window has its own child Microsoft.SqlTools.ServiceLayer process.
- Launch a second VS Code window with the New Window command.
- Install C# VS Code extension https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp.
- Create a new folder and open it in VS Code.
- Add new file in folder with .cs extension and open the file. This will activate the C# extension and install the debugger binaries.
- Create a subdirectory .vscode and add a file launch.json with the below contents
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command.pickProcess}",
"justMyCode": false
}
]
}
- Switch to debugger viewlet and click Start Debugging button
- Select the Microsoft.SqlTools.ServiceLayer process located in step 2
- In the first VS Code instance execute the crash repro scenario
- When the service instance crashes the unhandled exception should break in the second VS Code instance.
- Copy the $exception details and stack trace (from StackTrace propery) and provide it in the GitHub issue. Copying from the Debug Console usually works better than from Locals pane due to text truncation during copy.
- Getting started tutorial
- Enable Integrated Authentication on macOS and Linux using Kerberos
- Manage connection profiles
- Customize keyboard shortcuts
- Customize extension options
- Contributing
- Usage reporting
- OpenSSL configuration (Mac Only)
- Pre-Windows 10 pre-requisite
- Troubleshooting
- Operating Systems
- Releases