You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add such kind of dap config to attach to a process:
dap.configurations.c = {
{
name = "Select and attach to process",
type = "cppdbg",
request = "attach",
processId = function()
print("Set 'echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope' (reset it to 1 after you are done).")
print("Press any key when ready...")
vim.fn.getchar()
local name = vim.fn.input('Executable name (filter): ')
return require("dap.utils").pick_process({ filter = name })
end,
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
}
}
}
}
Basically, the issue is that I want to see it printing such prompt in the status line before selecting the process
Set 'echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope' (reset it to 1 after you are done).
Press any key when ready...
But it ends up printing only the last one (i.e.
Press any key when ready...
Why does that happen and how can it be done to see multiple lines?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to add such kind of dap config to attach to a process:
Basically, the issue is that I want to see it printing such prompt in the status line before selecting the process
But it ends up printing only the last one (i.e.
Why does that happen and how can it be done to see multiple lines?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions