Search code examples
ballerinaballerina-vscode-plugin

Intellij/VSCode ballerina debugger don't hit breakpoints


I have made, super easy, hello world app with main.

import ballerina/io;
public function main() {
    io:println("Hello, World!");
}

I'm making breakpoint like always in IDE "RED DOT"(tried both intellij and vscode) I go for run debug and it doesn't stop on target breakpoint. It compiles good, outputs "Hello, World!" as it should

What I have tried already:

  • reinstal ballerina 1.0.4
  • reinstal plugins
  • tried on both IDEs
  • start new project with super easy hallo world

console output under

Ballerina Debugging is an experimental feature.
Visit https://ballerina.io/learn/tools-ides/intellij-plugin/using-intellij-plugin-features#debugging-ballerina-programs for known limitations and workarounds.

Waiting for debug process to start...

"C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.2\bin\runnerw64.exe" "C:/Program Files/Ballerina/ballerina-1.0.4/distributions/jballerina-1.0.4\bin\ballerina.bat" run --debug 52376 --sourceroot C:\nieTenKoziol\ballerina-test-debugger mod1
Please start the remote debugging client to continue...
Listening for transport dt_socket at address: 52376
Compiling source
    nieTenKoziol/mod1:0.1.0

Creating balos
    target\balo\mod1-2019r3-any-0.1.0.balo

Generating executables
    target\bin\mod1.jar

Running executables

Hello, World!
Disconnected successfully from the debug server.
Terminate batch job (Y/N)? 


Solution

  • There is a known bug in 1.0.4 where debug points are being skipped. This is reported at https://github.com/ballerina-platform/ballerina-lang/issues/19981 and a fix is already being sent. Fix will be available with next patch release.

    However, remote debugging is working fine with 1.0.4.