Inellij IDEA plugin and dalve [debugger] for windows [test_build]

699 views
Skip to first unread message

Andrey Kolkov

unread,
Jan 19, 2016, 5:29:26 PM1/19/16
to golang-nuts
Hi!

If anybody wants to test debugging on windows.
This archive contains last Intellij IDEA (PhpStorm, WebStorm, etc.) Golang plugin and last dalve from Luck Hoban windows branche. 
Tested on Windows 8.1 64bit and IDEA 15.0.2

http://kolkov.ru/share/dlv/dalve.rar

How to use:
Unpack to local disk folder like c:\dalve
Open IDEA.File.Settings.Plugins;
Then click on [Install plugin from disk...] button;
Browse for plugin file and click Ok. Restart IDEA.

Then edit file:
 idea.properties
(in my case) located at:
C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.2\bin:
add new line with code like below:
dlv.path=c:/dalve/dlv.exe

It's path to your dlv.exe file 
(I put it into %GOPATH%/bin)

Then select run/debug confuguration and add Go Aplication;
Setup and click Ok!

Congratulation! 
Now Debugging is enabled! 
(May be you need to restart IDEA again.)

Supported IDEs

Pre-release builds can be installed on IntelliJ platform versions 141.1532 – 141.9999 and 143.380 – 143.9999:

  • IntelliJ IDEA 14.1.4 or 15 (Ultimate or Community)
  • WebStorm 10.0.4 or 11
  • PhpStorm 9.0 or 10
  • PyCharm 4.5.2+ or 5
  • RubyMine 7.1.3+ or 8
  • CLion 1.0.3+ or 1.2
  • Android Studio 1.2.1+

Andrey Kolkov

unread,
Jan 19, 2016, 5:54:02 PM1/19/16
to golang-nuts
Delve of course. (( fix please!

среда, 20 января 2016 г., 1:29:26 UTC+3 пользователь Andrey Kolkov написал:

Adrian Sampaleanu

unread,
Jan 23, 2016, 12:43:36 AM1/23/16
to golang-nuts

Thanks for posting this, Andrey (and for answering on Github). Can you tell me if this includes the single stepping commit? I managed to get this working with Visual Studio Code, but single stepping by stepping over (F10) kept entering Google code for some reason, and the debugger couldn't find source for that. In IntelliJ Idea, the option to set a breakpoint wasn't enabled for me - was it available for you? Will you keep updated builds of delve at that URL?

Thanks

Andrey Kolkov

unread,
Jan 23, 2016, 5:19:42 PM1/23/16
to golang-nuts
Hi! delve including commits up to 20.01.2016 23:22 (with proc: Single step only "current" thread
Instead of the `step` command single stepping every thread, instead only
step the "current" thread. This fixes a few issues surrounding single
stepping, and simplifies the logic. The original concerns around only
stepping a single thread (with regard to coordination) are invalid and
generally non-issues.)
and pathced IDEA plugin up to 22.01.2016 01:27
yes in IDEA breakpoints was enabled for me.

суббота, 23 января 2016 г., 8:43:36 UTC+3 пользователь Adrian Sampaleanu написал:

Adrian Sampaleanu

unread,
Jan 23, 2016, 10:01:32 PM1/23/16
to golang-nuts
Andrey, I built the Jetbrains Go plugin myself and I've also added the delve path to gradle properties, as customDlvPath = C:/dev/projects/_go/bin/dlv.exe. (this is in my GOPATH). I also changed idea.properties to add dlv.path=C:/dev/projects/_go/bin/dlv.exe to it, as you said.

In Idea I created a Debug configuration, but when I ran that, Idea said "Cannot find runner for <the name of my configuration>". I tried rebuilding the plugin without setting "customDlvPath" in gradle.properties, but got the same result when I tried debugging. I'm not sure where Idea is looking for delve - it's on the path by virtue of being on %GOPATH%/bin and should also be set through the properties I mentioned above. Any suggestions?

Adrian Sampaleanu

unread,
Jan 23, 2016, 10:16:17 PM1/23/16
to golang-nuts
I tried using the plugin archive you provided in the first post and that one works. Could you tell me precisely what, if anything, you changed before running "gradle buildPlugin"?

Thanks


Andrey Kolkov

unread,
Jan 23, 2016, 11:44:10 PM1/23/16
to golang-nuts
https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2200 - it's the full instructons how to buid.
customDlvPath - It works on debug IDEA only, apparently program arguments doesn't work after installation.
You need set IS_DLV_DISABLED = false; in %path_to_your_sources%\src\com\goide\dlv\DlvDebugProcess.java
And then build. Load your plugin into IDEA, and then:
In idea.properties set path to dlv.exe restart and restart IDEA again.
Then set run configuration to GO APPLICATION, not GO TEST and not a SINGLE FILE.

воскресенье, 24 января 2016 г., 6:01:32 UTC+3 пользователь Adrian Sampaleanu написал:

Adrian Sampaleanu

unread,
Jan 24, 2016, 12:26:36 AM1/24/16
to golang-nuts

Thanks, Andrey, that worked.

Andrey Kolkov

unread,
Jan 24, 2016, 1:32:56 AM1/24/16
to golang-nuts
https://github.com/derekparker/delve/issues/198#issuecomment-174253735Windows support is now available in master.  

воскресенье, 24 января 2016 г., 8:26:36 UTC+3 пользователь Adrian Sampaleanu написал:

Thanks, Andrey, that worked.
Reply all
Reply to author
Forward
0 new messages