-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using 'launchBrowser' can break debugging with 'Unexpected end of JSON input' error #1274
Comments
I think I see the problem. If so this looks pretty simple to fix -- we are currently NOT redirecting standard output when launching the browser (just standard error). I believe this will mean that any standard output text will get passed to VS Code which will try and interpret it as JSON. So all we need to do is monitor stdout and drop the text on the floor. |
This updates the debugger packages to the latest build. This includes the external console work, and which I hope is the fix for: dotnet#1274
This updates the debugger packages to the latest build. This includes the external console work, and which I hope is the fix for: dotnet#1274
* Update the debugger packages to the 03-03-2017 build This updates the debugger packages to the latest build. This includes the external console work, and which I hope is the fix for: #1274 * Fix lint warning * Remove BOM from package.json Somehow I must have accidentially added a BOM to package.json. This removes it.
@osmarlandin I added a beta release (1.8-beta2) that I hope addresses your issue. Can you give it a try when you have the chance and see if your issue is fixed? Instructions: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases |
@gregg-miskelly Everything ok. Thank you! |
@osmarlandin great! Thanks for checking. |
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-1-003177)
Product Information:
Version: 1.0.0-preview2-1-003177
Commit SHA-1 hash: a2df9c2576
Runtime Environment:
OS Name: fedora
OS Version: 24
OS Platform: Linux
RID: fedora.24-x64
VS Code version:
1.9.1
C# Extension version:
1.7.0
Steps to reproduce
dotnet new -t web
dotnet restore
Expected behavior
Debugger should work as expected
Actual behavior
Debug stops working and Code shows the error message "Unexpected end of JSON input. Stopping the debug adapter."
VS Code creates the file launch.json under .vscode folder. Inside that file, the configuration below is automatically created:
{ "name": ".NET Core Launch (web)", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>", "args": [], "cwd": "${workspaceRoot}", "stopAtEntry": false, "launchBrowser": { "enabled": true, "args": "${auto-detect-url}", "windows": { "command": "cmd.exe", "args": "/C start ${auto-detect-url}" }, "osx": { "command": "open" }, "linux": { "command": "xdg-open" } }, "env": { "ASPNETCORE_ENVIRONMENT": "Development" }, "sourceFileMap": { "/Views": "${workspaceRoot}/Views" } }
As I observed, the problem is when using the
launchBrowser
configuration. Commenting that line, debugger works as expected. If use this configuration, debugger crashes.The text was updated successfully, but these errors were encountered: