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

Breakpoints stoppped working #60747

Closed
booleangate opened this issue Oct 12, 2018 · 18 comments
Closed

Breakpoints stoppped working #60747

booleangate opened this issue Oct 12, 2018 · 18 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@booleangate
Copy link

Issue Type: Bug

As of 1.28.1, breakpoints in debugger suspend application, but debugger UI is not activated (cannot step debug).

  1. Run application through debugger.
  2. Execute code path that contains a breakpoint. Application is suspended, but debugger UI does not update to allow you to actually step debug.

VS Code version: Code 1.28.1 (3368db6, 2018-10-11T18:07:48.477Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: unavailable_software
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 2
Memory (System) 16.00GB (0.03GB free)
Process Argv -psn_0_311372
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
vscode-sqlite ale 0.3.1
better-toml bun 0.3.2
npm-intellisense chr 1.3.0
jsrefactor cms 2.15.1
vscode-eslint dba 1.6.0
tslint eg2 1.0.40
auto-close-tag for 0.5.6
Python-autopep8 him 1.0.2
vscode-less mrm 0.6.3
python ms- 2018.9.0
Go ms- 0.6.91
vsliveshare ms- 0.3.790
debugger-for-chrome msj 4.10.2
trailing-spaces sha 0.2.11
markdown-all-in-one yzh 1.6.2
@isidorn
Copy link
Contributor

isidorn commented Oct 12, 2018

Can yuo reproduce this with latest vscode insiders https://code.visualstudio.com/insiders/
If yes, can you please write some reproducable steps so we actually try to debug this. What application are you debugging, can you share it and so on. Minimal reproducable steps please.

@isidorn isidorn added info-needed Issue requires more information from poster debug Debug viewlet, configurations, breakpoints, adapter issues labels Oct 12, 2018
@booleangate
Copy link
Author

booleangate commented Oct 14, 2018

I can reproduce this with VS Code Insiders. In my Go application, I set a break point and start the debugger using the following launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "API",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "remotePath": "",
            "port": 2345,
            "host": "127.0.0.1",
            "program": "/Users/johnsonj/dev/omnivore/giganto/om/backend/api/cmd/api/main.go",
            "env": {},
            "args": [
                "/Users/johnsonj/dev/omnivore/giganto/om/backend/api/config/config.ini",
                "/Users/johnsonj/dev/omnivore/giganto/om/backend/api/config/dev_config.ini"
            ],
            "showLog": true
        }
    ]
}

When execution hits a break point, the application is suspended but the UI is not right.

screen shot 2018-10-14 at 1 26 35 pm

You can see that the break point line is highlighted, but the step tools are in the wrong mode (as if no break point has been encountered and execution is not suspended.

Unfortunately, I cannot share the application. Is there any environment information or logging that I can give you?

@isidorn
Copy link
Contributor

isidorn commented Oct 15, 2018

@booleangate thanks for providing more details.
I would actually start with going to the go extension https://github.com/Microsoft/vscode-go so that they investigate on their side first. Can you please also create an issue there

I will keep this issue open so I am aware of it.
What happens if you expand one of those threads you have in the screen shot under the CALL STACK view. If you click on a stack frame does the debug toolbar show the proper actions?

@booleangate
Copy link
Author

Interesting, the stack is empty for the paused thread:

screen shot 2018-10-15 at 10 15 56 am

Should I still open an issue with vscode-go or does this point you in a new direction?

@jinmatt
Copy link

jinmatt commented Oct 15, 2018

👍
Having the same issue in VS code(not insiders)

@isidorn
Copy link
Contributor

isidorn commented Oct 16, 2018

@booleangate yes please open an issue with vscode-go and they can start investigating. Thanks

@isidorn
Copy link
Contributor

isidorn commented Oct 16, 2018

@ramya-rao-a are you also owning the go debug adapter? If yes did something change there and did you have users filling similar issues?
Thanks

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Oct 16, 2018

@isidorn Yes, I own the Go debug adapter as well. @roblourens helps me there from time to time.
Nothing changed there in the recent past.

@ramya-rao-a
Copy link
Contributor

@booleangate Please add "trace": "verbose" to your debug configuration, try again and share the logs that get printed to the debug console.

Also, do you see similar issue in a simpler program that you can share?

@jinmatt
Copy link

jinmatt commented Oct 16, 2018

Switched back to August release 1.27.2, and works as it used to.

@ramya-rao-a here is the trace from 1.28.1:

continue state {"Running":false,"currentThread":{"id":1199227,"pc":31866287,"file":"/Users/jinmatt/go/src/lib/api/http/health_handler.go","line":25,"function":{"name":"lib/api/http.healthHandler.read","value":31866272,"type":0,"goType":0,"optimized":false},"goroutineID":53,"breakPoint":{"id":1,"name":"","addr":31866287,"file":"/Users/jinmatt/go/src/lib/api/http/health_handler.go","line":25,"functionName":"lib/api/http.healthHandler.read","Cond":"","continue":false,"goroutine":false,"stacktrace":0,"LoadArgs":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"LoadLocals":{"FollowPointers":true,"MaxVariableRecurse":1,"MaxStringLen":64,"MaxArrayValues":64,"MaxStructFields":-1},"hitCount":{"53":1},"totalHitCount":1},"breakPointInfo":{"arguments":[{"name":"h","addr":824727868248,"onlyAddr":false,"type":"lib/api/http.healthHandler","realType":"lib/api/http.healthHandler","flags":8,"kind":25,"value":"","len":0,"cap":0,"children":[],"base":0,"unreadable":"","LocationExpr":"[block] DW_OP_call_frame_cfa ","DeclLine":25},{"name":"r","addr":824727868264,"onlyAddr":false,"type":"*net/http.Request","realType":"*net/http.Request","flags":8,"kind":22,"value":"","len":1,"cap":0,"children":[{"name":"","addr":824636548864,"onlyAddr":false,"type":"net/http.Request","realType":"net/http.Request","flags":0,"kind":25,"value":"","len":22,"cap":0,"children":[{"name":"Method","addr":824636548864,"onlyAddr":false,"type":"string","realType":"string"[...]
StoppedEvent("breakpoint")
ThreadsRequest
goroutines [{"id":1,"currentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":32184162,"file":"/Users/jinmatt/go/src/lib/api/http/server.go","line":178,"function":{"name":"lib/api/http.(*server).ListenAndServe","value":32177184,"type":0,"goType":0,"optimized":false}},"goStatementLoc":{"pc":17165051,"file":"/usr/local/go/src/runtime/asm_amd64.s","line":201,"function":{"name":"runtime.rt0_go","value":17164752,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16986048,"file":"/usr/local/go/src/runtime/proc.go","line":110,"function":{"name":"runtime.main","value":16986048,"type":0,"goType":0,"optimized":true}},"threadID":0,"unreadable":""},{"id":2,"currentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":16986917,"file":"/usr/local/go/src/runtime/proc.go","line":240,"function":{"name":"runtime.init.4","value":16986864,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16986944,"file":"/usr/local/go/src/runtime/proc.go","line":243,"function":{"name":"runtime.forcegchelper","value":16986944,"type":0,"goType":0,"optimized":t[...]
ThreadsResponse [{"id":1,"name":"lib/api/http.(*server).ListenAndServe"},{"id":2,"name":"runtime.gopark"},{"id":18,"name":"runtime.gopark"},{"id":19,"name":"runtime.gopark"},{"id":20,"name":"os/signal.signal_recv"},{"id":21,"name":"lib/vendor/googlemaps.github.io/maps.NewClient.func1"},{"id":3,"name":"runtime.asmcgocall"},{"id":22,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":23,"name":"runtime.gopark"},{"id":27,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":10,"name":"database/sql.(*DB).connectionOpener"},{"id":34,"name":"runtime.asmcgocall"},{"id":33,"name":"runtime.gopark"},{"id":53,"name":"lib/api/http.healthHandler.read"},{"id":32,"name":"runtime.gopark"},{"id":36,"name":"runtime.gopark"},{"id":8,"name":"runtime.gopark"},{"id":50,"name":"runtime.gopark"},{"id":9,"name":"runtime.gopark"},{"id":51,"name":"runtime.gopark"},{"id":52,"name":"runtime.gopark"},{"id":38,"name":"internal/poll.runtime_pollWait"},{"id":66,"name":"io.(*pipe).Read"},{"id":67,"name":"database/sql.(*DB).connectionOpener"},{"id":68,"name":"database/sql.(*DB).connectionResetter"},{"id":69,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":70,"name":"runtime.gopark"},{"id":82,"name":"runtime.gopark"},{"id":98,"name":"runtime.asmcgocall"},{"id":11,"name":"database/sql.(*DB).connectionResetter"},{"id":114,"name":"internal/poll.runtime_pollWait"},{"id":16,"name":"internal/poll.runtime_pollWait"},{"id":115,"name":"runtim[...]
StackTraceRequest
ThreadsRequest
locations [{"pc":31866287,"file":"/Users/jinmatt/go/src/lib/api/http/health_handler.go","line":25,"function":{"name":"lib/api/http.healthHandler.read","value":31866272,"type":0,"goType":0,"optimized":false},"Locals":[],"Arguments":[{"name":"h","addr":824727868248,"onlyAddr":false,"type":"lib/api/http.healthHandler","realType":"lib/api/http.healthHandler","flags":8,"kind":25,"value":"","len":0,"cap":0,"children":[],"base":0,"unreadable":"","LocationExpr":"[block] DW_OP_call_frame_cfa ","DeclLine":25},{"name":"r","addr":824727868264,"onlyAddr":false,"type":"*net/http.Request","realType":"*net/http.Request","flags":8,"kind":22,"value":"","len":1,"cap":0,"children":[{"name":"","addr":824636548864,"onlyAddr":false,"type":"net/http.Request","realType":"net/http.Request","flags":0,"kind":25,"value":"","len":22,"cap":0,"children":[{"name":"Method","addr":824636548864,"onlyAddr":false,"type":"string","realType":"string","flags":0,"kind":24,"value":"GET","len":3,"cap":0,"children":[],"base":824727764992,"unreadable":"","LocationExpr":"","DeclLine":0},{"name":"URL","addr":824636548880,"onlyAddr":false,"type":"*net/url.URL","realType":"*net/url.URL","flags":0,"kind":22,"value":"","len":1,"cap":0,"children":[{"name":"","addr":824727684224,"onlyAddr":false,"type":"net/url.URL","realType":"net/url.URL","flags":0,"kind":25,"value":"","len":9,"cap":0,"children":[{"name":"Scheme","addr":824727684224,"onlyAddr":false,"type":"string","realType":"string","flags":0,"kind":24,"value":"","len":0,"ca[...]
StackTraceResponse
goroutines [{"id":1,"currentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":32184162,"file":"/Users/jinmatt/go/src/lib/api/http/server.go","line":178,"function":{"name":"lib/api/http.(*server).ListenAndServe","value":32177184,"type":0,"goType":0,"optimized":false}},"goStatementLoc":{"pc":17165051,"file":"/usr/local/go/src/runtime/asm_amd64.s","line":201,"function":{"name":"runtime.rt0_go","value":17164752,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16986048,"file":"/usr/local/go/src/runtime/proc.go","line":110,"function":{"name":"runtime.main","value":16986048,"type":0,"goType":0,"optimized":true}},"threadID":0,"unreadable":""},{"id":2,"currentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"userCurrentLoc":{"pc":16987492,"file":"/usr/local/go/src/runtime/proc.go","line":303,"function":{"name":"runtime.gopark","value":16987280,"type":0,"goType":0,"optimized":true}},"goStatementLoc":{"pc":16986917,"file":"/usr/local/go/src/runtime/proc.go","line":240,"function":{"name":"runtime.init.4","value":16986864,"type":0,"goType":0,"optimized":true}},"startLoc":{"pc":16986944,"file":"/usr/local/go/src/runtime/proc.go","line":243,"function":{"name":"runtime.forcegchelper","value":16986944,"type":0,"goType":0,"optimized":t[...]
ThreadsResponse [{"id":1,"name":"lib/api/http.(*server).ListenAndServe"},{"id":2,"name":"runtime.gopark"},{"id":18,"name":"runtime.gopark"},{"id":19,"name":"runtime.gopark"},{"id":20,"name":"os/signal.signal_recv"},{"id":21,"name":"lib/vendor/googlemaps.github.io/maps.NewClient.func1"},{"id":3,"name":"runtime.asmcgocall"},{"id":22,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":23,"name":"runtime.gopark"},{"id":27,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":10,"name":"database/sql.(*DB).connectionOpener"},{"id":34,"name":"runtime.asmcgocall"},{"id":33,"name":"runtime.gopark"},{"id":53,"name":"lib/api/http.healthHandler.read"},{"id":32,"name":"runtime.gopark"},{"id":36,"name":"runtime.gopark"},{"id":8,"name":"runtime.gopark"},{"id":50,"name":"runtime.gopark"},{"id":9,"name":"runtime.gopark"},{"id":51,"name":"runtime.gopark"},{"id":52,"name":"runtime.gopark"},{"id":38,"name":"internal/poll.runtime_pollWait"},{"id":66,"name":"io.(*pipe).Read"},{"id":67,"name":"database/sql.(*DB).connectionOpener"},{"id":68,"name":"database/sql.(*DB).connectionResetter"},{"id":69,"name":"lib/vendor/gopkg.in/redis.v5/internal/pool.(*ConnPool).reaper"},{"id":70,"name":"runtime.gopark"},{"id":82,"name":"runtime.gopark"},{"id":98,"name":"runtime.asmcgocall"},{"id":11,"name":"database/sql.(*DB).connectionResetter"},{"id":114,"name":"internal/poll.runtime_pollWait"},{"id":16,"name":"internal/poll.runtime_pollWait"},{"id":115,"name":"runtim[...]

@jinmatt
Copy link

jinmatt commented Oct 16, 2018

The issue for me is only when I'm trying to hit an http handler endpoint. Works well if I put a breakpoint in a main.go file(or any startup location).

@booleangate
Copy link
Author

booleangate commented Oct 16, 2018

@ramya-rao-a Here's the debug log. Downgrading to 1.27.2 also fixes my problem.

@jinmatt pointed out that he experiences the same thing in http endpoint handlers but not in main. I did a test and confirmed that I am experiencing the same problem with my application. Break points in main trigger as expected, but break points in http handlers exhibit the reported behavior.

@jinmatt Are you able to share your application?

@isidorn
Copy link
Contributor

isidorn commented Oct 17, 2018

@jinmatt yeah a reproducable case would be really useful here for us to investigate more.
@booleangate or you could try to crate a minimal reproducable sample for you which you could share

fyi @weinand

@booleangate
Copy link
Author

I'm sick and barely functioning 😷 I'll try to whip something up when I'm on my feet again.

@isidorn
Copy link
Contributor

isidorn commented Oct 17, 2018

Also try F1 > developer tools and opend debug console for potential errors
Potential duplicate #61088

@booleangate
Copy link
Author

booleangate commented Oct 17, 2018

An exception is being raised here https://github.com/Microsoft/vscode/blob/4f09f1aa4a47d0d9afc83dc601094b8e1f24c673/src/vs/base/common/uri.ts#L29

ERR [UriError]: Scheme is missing: {scheme: "", authority: "", path: "<autogenerated>", query: "", fragment: ""}:

Full stack trace

@weinand
Copy link
Contributor

weinand commented Oct 17, 2018

duplicate of #61088

@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 17, 2018
@vscodebot
Copy link

vscodebot bot commented Oct 17, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Oct 17, 2018
@weinand weinand removed the info-needed Issue requires more information from poster label Oct 17, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants