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

Breakpoint not hit in OTP source code #1492

Open
Mikaka27 opened this issue Jan 27, 2024 · 0 comments
Open

Breakpoint not hit in OTP source code #1492

Mikaka27 opened this issue Jan 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Mikaka27
Copy link

Describe the bug
After following https://erlang-ls.github.io/articles/tutorial-debugger/ to the best of my ability in OTP source code repo, I cannot get to the point that breakpoint get's hit.

To Reproduce
Before following this, your system must have this utilities installed: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md#required-utilities

  1. git clone https://github.com/erlang/otp.git
  2. Open otp folder in vscode with erlang_ls installed
  3. Put the following into .vscode/settings.json
{
    "erlang_ls.serverPath": "",
    "terminal.integrated.env.linux": {
        "ERL_TOP": "${workspaceFolder}",
        "PATH": "${workspaceFolder}/bin:${env:PATH}"
    }
}
  1. Put the following into .vscode/launch.json while replacing hostname
{
    // 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": "common test",
            "type": "erlang",
            "request": "attach",
            "projectnode": "ct@stacjonarny", <-------------------REPLACE HOSTNAME HERE!!!
            "cookie": "QCPKEUVDZXBWDBVRXZEV",
            "timeout": 300,
            "cwd": "${workspaceFolder}"
        }
    ]
}
  1. Restart vscode and open otp folder again
  2. Open integrated shell
  3. ./otp_build configure
  4. make
  5. Open lib/common_test/src/ct_auto_clean_SUITE.erl
  6. Put breakpoint onto line 150 (first line of clean/1 function)
  7. Hit F5 to start remote debugging
  8. In integrated shell put: make common_test_test ARGS="-suite ct_auto_clean_SUITE" TEST_NEEDS_RELEASE=False LOCAL_DEPS=debugger

I've skipped adding {overrides, [{hello_world, "../hello_world"}]}. because the project does not have relx.config file, not sure what this line is doing exactly. Also attaching dap_server.log file.

Any help is appreciated, thanks :)

Expected behavior
Breakpoint should be hit.

Actual behavior
Test executes fully, but no breakpoint is hit.

Context

  • erlang_ls version (tag/sha): v0.0.42
  • Editor used: VsCode
  • LSP client used: Don't know
  • dap_server.log file: dap_server.log
@Mikaka27 Mikaka27 added the bug Something isn't working label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant