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

v2.0: "undefined" is not valid json in #60

Open
Dreamoochy opened this issue Sep 15, 2023 · 7 comments
Open

v2.0: "undefined" is not valid json in #60

Dreamoochy opened this issue Sep 15, 2023 · 7 comments

Comments

@Dreamoochy
Copy link

VSCodium 1.82.1 with free-omnisharp 2.0.436. When I try to debug (F5) I get the following notification:

"undefined" is not valid JSON

Debug is not started. With free-omnisharp 1.25.7 everything is OK.

P.S. Portable VSCodium, portable .NET SDK (7.0.400)

@Gzushgshsh
Copy link

I had the same problem with VSCodium and dotnet 6.0 installed via the package manager on Debian. But it didn't recognize dotnet 6.0 and downloaded a portable version of 7.0 to use.

@Rebjai
Copy link

Rebjai commented Oct 1, 2023

Having the same issue with code - OSS on Manjaro, .NET SDK 7.0.111
Help > Toggle Developer tools:
image

@yelvert
Copy link

yelvert commented Oct 23, 2023

A workaround for this seems to be adding "csharp.debug": {}, to your settings

@mars-low
Copy link

A workaround from @yelvert didn't work for me unfortunately, at least not with the recent 2.7.25 and 2.0.436 versions.

However I found a reason why it fails and a temporary solution until the proper fix is merged.

Extension starts a debugger using the command defined here:
https://github.com/muhammadsammy/free-omnisharp-vscode/blob/master/src/coreclrDebug/activate.ts#L286-L291

So on Linux system it ends up with the command looking like:
~/code-server/Extensions/muhammad-sammy.csharp-2.7.25-universal/.debugger/netcoredbg while netcoredbg is installed to the path ~/code-server/Extensions/muhammad-sammy.csharp-2.7.25-universal/.debugger/netcoredbg/netcoredbg. So the workaround is to move all files from netcoredbg directory one level up directly to .debugger directory.

It looks like the installation path is taken from installTestPath defined in https://github.com/muhammadsammy/free-omnisharp-vscode/blob/master/package.json#L489-L505. I think the proper fix could just modify the command path mentioned above to that value.

@danyhoron
Copy link

Thank you @mars-low.
That workaround works.

@muhammadsammy
Copy link
Owner

muhammadsammy commented Oct 27, 2023

Added this workaround in v2.8.23.
Thanks @mars-low!

@Dreamoochy
Copy link
Author

Added this workaround in v2.8.23.

v2.8.23 on Win10 now looks like it does nothing. When I press F5, build process is started, and then nothing happens. It doesn't stop at breakpoints. And I don't see any error notification.

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

No branches or pull requests

7 participants