go-debug icon indicating copy to clipboard operation
go-debug copied to clipboard

Stop button not working

Open neclepsio opened this issue 8 years ago • 11 comments

In version 1.3.1, when I click the stop button, after a couple of times of correct behaviour, it stops working. The interface changes, but the process is not killed. So, then I hit the launch button again, I get:

Starting delve with config "Debug"
Failed to start delve with config "Debug"
  Error: Error: Already debugging!

neclepsio avatar Apr 24 '17 06:04 neclepsio

It seems there was an issue in go-debug. Please open the developer tools of atom using the Toggle Dev Tools command and check the Console tab for errors/warnings if this happens again. Can you also provide the code that caused this problem?

lloiser avatar Apr 26 '17 07:04 lloiser

I could not reproduce under Windows, but only under Ubuntu 16.10. There are no warnings. What do you mean by "the code that caused the problem"?

neclepsio avatar Apr 29 '17 08:04 neclepsio

I add the problem is really the stop button not working: if I kill the debug process, it works again. Another thing: how can I debug the problem is not in delve itself?

neclepsio avatar Apr 29 '17 09:04 neclepsio

You can try to run delve in your terminal/bash too. just cd to your package folder and run dlv debug. Have a look at https://github.com/derekparker/delve/tree/master/Documentation/usage to see how to use dlv.

lloiser avatar May 04 '17 08:05 lloiser

I tried but I don't know how to simulate what go-debug does to stop the execution.

neclepsio avatar May 05 '17 09:05 neclepsio

I also noticed clicking on play does not pause the execution. I'm using the default "debug" configuration. Is there a way to revert to previous version? Thank you.

neclepsio avatar May 10 '17 08:05 neclepsio

Sry but I'm still not able to reproduce this problem. Do you have some golang code that you can share with me that causes this problem? Or at least provide some information about the code. e.g. is it a http server you are starting? (this already caused some problems in the past)

Yes, you can downgrade go-debug but I highly suggest not to do it.

apm uninstall go-debug
apm install go-debug@<package_version>

lloiser avatar May 10 '17 10:05 lloiser

The code is very big and cannot be shared. Yes, I'm starting a http server. I also reinstalled everything from scratch. I will try again to debug the plugin on Linux in the weekend.

In the meantime: is pausing the execution supported? I have a deadlock somewhere in my code, and I really would need to pause when locked to inspect who is waiting what. I was expecting the "play" button became a "pause" during execution, like a lot of debuggers. I can't find this feature in the plugin code. Should I open a separate bug?

neclepsio avatar May 10 '17 11:05 neclepsio

is pausing the execution supported

No. I have tried to implement this a while ago but it wasn't working. Please open another issue for this maybe things have change in the meanwhile :), thx.

lloiser avatar May 10 '17 15:05 lloiser

I finally reproduced this! It happens if you have an http server (or some other kind of long running function) and hit continue in the debugger. So the debugger basically now runs forever. Now try to add a new breakpoint. It's actually not added because the debugger is currently busy running the actual program. Now click stop. Instead of correctly shutting down, go-debug remains in a weird state. I will see what I can do now.

lloiser avatar May 21 '17 20:05 lloiser

Sometimes it happens without setting breakpoints while it is running also

cleanunicorn avatar Jun 06 '17 08:06 cleanunicorn