-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.vimrc.ide.dap.lua
More file actions
101 lines (96 loc) · 2.81 KB
/
.vimrc.ide.dap.lua
File metadata and controls
101 lines (96 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
-- https://github.com/mfussenegger/nvim-dap-python
local dap = require('dap')
-- table.insert(dap.configurations.python, {
-- type = 'python',
-- request = 'launch',
-- name = 'My custom launch configuration',
-- program = '${file}',
-- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
-- })
require('dap-python').setup('~/.vim/dap-adapters/venv-debugpy/bin/python')
require('dap-python').test_runner = 'pytest'
-- See ~/.vim/dap-adapters/setup.sh
dap.adapters.node2 = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/.vim/dap-adapters/vscode-node-debug2/out/src/nodeDebug.js'},
}
dap.adapters.chrome = {
type = "executable",
command = "node",
args = {os.getenv("HOME") .. "/.vim/dap-adapters/vscode-chrome-debug/out/src/chromeDebug.js"}
}
dap.adapters.firefox = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/.vim/dap-adapters/vscode-firefox-debug/dist/adapter.bundle.js'},
}
-- dap.configurations.javascript = {
--
-- }
dap.configurations.typescript = {
{
name = 'Launch',
type = 'node2',
request = 'launch',
program = '${file}',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
},
{
name = 'Debug test',
type = 'node2',
request = 'launch',
-- program = '${workspaceFolder}/npm run-script test:unit-debug ${file}',
runtimeExecutable = "npm",
runtimeArgs = {"run-script", "test:unit-debug", "${file}"},
port = 9000,
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
},
{
-- For this to work you need to make sure the node process is started with the `--inspect` flag.
name = 'Attach to process',
type = 'node2',
request = 'attach',
processId = require'dap.utils'.pick_process,
},
{
type = "chrome",
runtimeExecutable = "/Users/seb/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
request = "launch",
name = "vuejs: chrome",
url = "http://localhost:8080",
webRoot = "${workspaceFolder}/src",
breakOnLoad = true,
-- sourceMapPathOverrides = {
-- "webpack:///./src/*" = "${webRoot}/*"
-- }
},
{
type = "chrome",
runtimeExecutable = "/Users/seb/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
request = "launch",
name = "vuejs: chrome: dev",
url = "https://dev.shortform.com",
webRoot = "${workspaceFolder}/src",
breakOnLoad = true,
-- sourceMapPathOverrides = {
-- "webpack:///./src/*" = "${webRoot}/*"
-- }
},
{
type = "firefox",
request = "launch",
name = "vuejs: firefox",
url = "http://localhost:8080",
webRoot = "${workspaceFolder}/src",
pathMappings = {
{ url = "webpack:///src/", path = "${webRoot}/" }
}
}
}