-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Debug should allow uri in DebugProtocol.Source #30996
Comments
The debug protocol has support for this: https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts#L244 |
Currently language server protocol But vscode debugger doesn't support setBreakpoints in the user customized editor. See the code If the debug protocol has some configuration items to allow the specific uri schemes to be set breakpoints in, it would be better. |
@weinand What about adding a new field 'uri' to DebugProtocol.Source and deprecated 'path'. |
@aeschli before we discussing solutions to the problem, let's try to understand the problem first. @testforstephen's comment from above says:
VS Code supports setting breakpoints for "languages" that are registered for breakpoints (this is the "breakpoints" contributions point). Has this been done for the "class" files? If not, you can easily enable setting breakpoints everywhere via the "debug.allowBreakpointsEverywhere" setting. If breakpoints have been registered for "class" and you still cannot set breakpoints, then this is a bug. |
|
@aeschli if setting breakpoints still doesn't work, then this is a bug. @isidorn could you please investigate. The other issue is already being solved as we speak. The DA will be able to pass |
Thanks for pointing this out. |
This is now nicely supported also via 22d7830 Anyways you should be able to send a string @testforstephen let us know if it nicely works for you |
@isidorn it seems the latest insider version is published at 2017-09-20. Can you share how often the insider build is taken? |
@testforstephen normally, Insiders is created in the morning of every working day. However, due to the hurricane activities the signing service for Windows and macOS builds is currently failing and a backup service is overloaded. You can try the linux builds. |
@aeschli It would be great, if we could verify this with the Java extension. |
@weinand @aeschli @isidorn Today i have tried the latest insider in ubuntu 14.04 LTS, the feature works like a charm. Great thanks for the work. Now for third-party class, the java debugger just need send the uri in Source.path, VSCode will use jdt content provider (registered by vscode-java extension) to render the class source automatically. Besides, i can also add breakpoint in jdt content provider before launching debugger. The debugger could work with java language server extension seamlessly. |
@weinand @isidorn When launching a new debug session, the uri paths of the previously persisted breakpoints in the jdt content provider seem not consistent with the original uri that the java debugger returns. The original uri in the StackTrace response body returned by the java debugger is The uri in the breakpoint request is changed to It's query segment is encoded by VSCode (reference uri.toString() https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/uri.ts) Although the encoded uri can be parsed by our java debugger very well, no feature break yet. |
In the Java language server, we can open classfiles with source attachment in the editor. It uses virtual documents with our own uri scheme. (e.g. jdt://contents/rt.jar/java.io/PrintStream.class).
We would like the debugger's stackframe location to return that uri too.
However, current debug protocol always expects file path. See the debugSource.ts https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/common/debugSource.ts
Ideally DebugProtocol.Source would also support a field
uri
that could be used instead of a pathThe text was updated successfully, but these errors were encountered: