Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Clicking 'debug test' twice runs two instances of the debugger simultaneously #1383

Closed
willfaught opened this issue Nov 29, 2017 · 4 comments

Comments

@willfaught
Copy link

Reproduce:

  1. Set a breakpoint.
  2. Click 'debug test' and wait to hit the breakpoint.
  3. Step one line forward.
  4. Click 'debug test' and wait to hit the breakpoint, again.

  • VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:23:26.125Z)
  • OS Version: Darwin x64 17.2.0
  • Extensions:
Extension Author (truncated) Version
vscode-docker Pet 0.0.22
sort-lines Tyr 1.3.0
githistory don 0.2.3
markdown-table-formatter jos 0.2.3
Go luk 0.6.69
prettify-json moh 0.0.3
azure-account ms- 0.2.2
rewrap stk 1.5.3
gitblame wad 2.2.0
vscode-proto3 zxh 0.1.2
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Dec 5, 2017

Thanks for reporting @willfaught

The apis available to track a debug session can be found at https://github.com/Microsoft/vscode/blob/1.18.1/src/vs/vscode.d.ts#L6112-L6134 which can be used to disable the debug code lens when a debug session is already active.

The codelens for the tests are created in https://github.com/Microsoft/vscode-go/blob/0.6.69/src/goRunTestCodelens.ts

PRs to fix this issue are welcome.

@lggomez
Copy link
Contributor

lggomez commented Feb 21, 2018

I can no loger reproduce this since version 0.6.76+, vs code 1.20.1 commit f88bbf9137d24d36d968ea6b2911786bfe103002

PS: I did not test it yet on bigger projects, only with github.com/go-training/helloworld, but it looks promising since I recall having this issue before

Could someone else try to reproduce it?

@ramya-rao-a
Copy link
Contributor

On Windows I get an error when trying to debug the second time

go install testmain: open c:\GoCode\src\github.com\golang\example\stringutil\debug.test: The process cannot access the file because it is being used by another process.
Process exiting with code: 1
image

But I do see it on my Mac

I used the https://github.com/golang/example/stringutil project

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 28, 2020

Hello all,

We are in the midst of a repo move, see We are moving section in our readme for more details.

Please subscribe to golang/vscode-go#109 for further updates on this issue.

Thanks for all the support & Happy Coding!

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

Successfully merging a pull request may close this issue.

4 participants