Skip to content
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

Error: Unable to start debugging. Launch options string provided by the project system is invalid. 's' is an unexpected token. Expecting white space. Line 3, position 66. #651

Closed
joshrouwhorst opened this issue Aug 10, 2016 · 5 comments
Assignees
Milestone

Comments

@joshrouwhorst
Copy link

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64

VS Code version:
Version 1.4.0 (1.4.0)

C# Extension version:
1.3.0

Steps to reproduce

I followed the steps from the Instructions for setting up the .NET Core debugger.

  1. Created a directory for my project.
  2. Entered dotnet new
  3. Entered dotnet restore
  4. Opened the project in VS Code
  5. I clicked "Yes" to add the required build and debug assets
  6. I set a breakpoint on the Console.WriteLine("Hello World!"); line of the automatically generated Program.cs file
  7. I went to the Debug view
  8. I made sure ".NET Core Launch (console)" was selected in the configuration dropdown
  9. I clicked the "Start Debugging" button

Expected behavior

I would expect that the Program.cs file would run until it reaches the breakpoint, pause and allow me to step through the rest of the code.

Actual behavior

I receive this error message

Unable to start debugging. Launch options string provided by the project system is invalid. 's' is an unexpected token. Expecting white space. Line 3, position 66.

And it gives me the choice to Close or Open launch.json

Here's the contents of my launch.json file, which is the default auto-generated file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/MyApp.dll",
            "args": [],
            "cwd": "${workspaceRoot}",
            "externalConsole": false,
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command.pickProcess}"
        }
    ]
}
@joshrouwhorst
Copy link
Author

Also, I should point out that this is my first time trying to set this up. It has never successfully ran on my machine.

@gregg-miskelly
Copy link
Contributor

Can you send enable logging and send the output? I think this problem will be late enough that the 'quick' method will work: https://github.com/OmniSharp/omnisharp-vscode/wiki/Enabling-C%23-debugger-logging

@joshrouwhorst
Copy link
Author

Here's the output:

1: (348) LaunchOptions  WorkingDirectory='/Users/joshrouwhorst/Documents/Projects/Josh's/coretest/MyApp'
1: (348) LaunchOptions  ExeArguments='/Users/joshrouwhorst/Documents/Projects/Josh's/coretest/MyApp/bin/Debug/netcoreapp1.0/MyApp.dll'
1: (348) LaunchOptions  MIDebuggerPath='/Users/joshrouwhorst/.vscode/extensions/ms-vscode.csharp-1.3.0/coreclr-debug/debugAdapters/clrdbg'
1: (348) LaunchOptions  MIMode='clrdbg'
1: (348) LaunchOptions>
1: (348) LaunchOptions</LocalLaunchOptions>
 R: {"success":false,"message":"Unable to start debugging. Launch options string provided by the project system is invalid. 's' is an unexpected token. Expecting white space. Line 3, position 66.","request_seq":2,"command":"launch","body":{"error":{"id":1104,"format":"Unable to start debugging. Launch options string provided by the project system is invalid. 's' is an unexpected token. Expecting white space. Line 3, position 66.","variables":null}},"running":false,"refs":null,"seq":0,"type":"response"}
C disconnect: {"restart":false}
 R: {"success":true,"message":null,"request_seq":3,"command":"disconnect","body":null,"running":false,"refs":null,"seq":0,"type":"response"}

However, when looking at this output, I figured out the problem. I had the project under a folder named "Josh's". I copied the project over to a folder named "Joshs" (no apostrophe) and it worked for me.

What would be the proper procedure for this, close this and enter a new bug?

Thanks!

@gregg-miskelly
Copy link
Contributor

Excellent. We can use this bug to track the problem. Thanks for reporting it!

@wesrupert
Copy link
Contributor

Fix should be available in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants