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

Common test debug, not hitting breakpoints #1431

Open
itsdend opened this issue Apr 5, 2023 · 1 comment
Open

Common test debug, not hitting breakpoints #1431

itsdend opened this issue Apr 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@itsdend
Copy link

itsdend commented Apr 5, 2023

Describe the bug
When trying to debug the common tests break points don't get hit.
Maybe I am configuring it wrong, but i'm not sure tbh.

I tried to put the breakpoint on the same line in the file that is in the /src folder, /_build/..., and also the line in the *_SUITE.erl module.
Sometimes, I can't find out exactly when, it "stops" at the breakpoint, but the common test keeps running, which is pretty okay, I'm fine with it just finishing, as long as I can have the look in the variables. When that happens, sadly it just leaves the debug mode and and exits my variable view when the common test finishes.

Also when debug for rebar3 ct starts, all the breakpoint deactivate so I have to activate them before,
by maniacally clicking on them in the bottom corner, then sometimes they work like stated above, but its painful.

erlang_ls.config ->
otp_path: "/usr/lib/erlang"
deps_dirs:

  • "lib/*"
    diagnostics:
    enabled:
    • crossref
      disabled:
    • bound_var_in_pattern
      apps_dirs:
  • "apps/*"
  • "_build/default/lib/*"
    include_dirs:
  • "apps"
  • "apps/*/include"
  • "include"
  • "src"
  • "_build/default/lib"
  • "_build/default/lib/*/include"
  • "extras"
  • "test"
  • "test/*_data"
    lenses:
    enabled:
    • suggest-spec
    • function-references
    • ct-run-test
      providers:
      enabled:
    • signature-help

launch.json -> snippet of configuration for ct
{
"name": "rebar ct all",
"type": "erlang",
"request": "launch",
"runinterminal": [
"rebar3",
"ct",
"--sname",
"${workspaceFolderBasename}_main_node",
"--setcookie",
"COOKIE",
"--cover"
],
"projectnode": "${workspaceFolderBasename}_main_node",
"cookie": "COOKIE",
"timeout": 300,
"cwd": "${workspaceRoot}"
},
{
"name": "rebar ct case",
"type": "erlang",
"request": "launch",
"runinterminal": [
"rebar3",
"ct",
"--sname",
"${workspaceFolderBasename}_main_node",
"--setcookie",
"COOKIE",
"--suite",
"${fileBasenameNoExtension}",
"--case",
"${selectedText}"
],
"projectnode": "${workspaceFolderBasename}_main_node",
"cookie": "COOKIE",
"timeout": 300,
"cwd": "${workspaceRoot}"
},

To Reproduce
Run the configuration from the launch.json.

Expected behavior
When the line has the breakpoint it should stop there. And you should have a look into the vars,....

Actual behavior
Continues to run without stopping.

Context

  • erlang_ls version (tag/sha): extension version v0.0.39
  • Editor used: VSCODE
  • LSP client used: erlang_ls
@itsdend itsdend added the bug Something isn't working label Apr 5, 2023
@robertoaloi
Copy link
Member

Hi @itsdend and sorry for the late response. Could you provide a copy of the dap_server.log file that you can find in ~/.cache/els_dap ?

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

2 participants