Comments (3)
I'm not sure if this is the correct way, but I got mine to work with this. Basically it loads defaults for jsnode
and then configure typescript to use node2
.
-- From the instruction on this repo
local dap_install = require("dap-install")
dap_install.config("jsnode", {})
-- From github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#Javascript
local dap = require("dap")
dap.configurations.typescript = {
{
name = 'Launch',
type = 'node2',
request = 'launch',
program = '${file}',
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,
},
}
I think the fix applied to #38 (340cb26) can also be done for this issue
from dap-buddy.nvim.
I'm not sure if this is the correct way, but I got mine to work with this. Basically it loads defaults for
jsnode
and then configure typescript to usenode2
.-- From the instruction on this repo local dap_install = require("dap-install") dap_install.config("jsnode", {}) -- From github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#Javascript local dap = require("dap") dap.configurations.typescript = { { name = 'Launch', type = 'node2', request = 'launch', program = '${file}', 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, }, }I think the fix applied to #38 (340cb26) can also be done for this issue
Not having much luck with this, :lua require"dap".continue()
seems to just fail silently now (was having the same issue as OP before)
from dap-buddy.nvim.
Was able to get typescript working after running DIInstall jsnode
, adding outFiles
to the above config (see below), and running tsc -p .
in the project root. Not sure if dap is supposed to build .ts files itself, but this is trivial to do from vim anyway. Full config:
local dap_install = require('dap-install')
dap_install.config('jsnode', {})
local dap = require('dap')
dap.configurations.typescript = {
{
name = 'Run',
type = 'node2',
request = 'launch',
program = '${file}',
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = 'inspector',
console = 'integratedTerminal',
outFiles = {"${workspaceFolder}/build/**/*.js"},
},
{
name = 'Attach to process',
type = 'node2',
request = 'attach',
processId = require'dap.utils'.pick_process,
},
}
from dap-buddy.nvim.
Related Issues (20)
- Use system package in debugpy HOT 5
- Synchronous adapter installation HOT 1
- `ccppr_lldb` insists I do not need to install it HOT 1
- how to use iwth rust-tools.nvim?
- Error occur in using codelldb
- cannot step_into python library code [justMyCode option maybe] HOT 1
- DIInstall crashes nvim
- `:DIInstall ccppr_vsc` complains wget is missing URL HOT 4
- How do you actually run the debugger 😅 HOT 3
- nodejs configuration is not working
- No configuration found for 'c'
- Bash debugger implementation discussion
- Multi-install debuggers 🦆🦆🦆🦆
- require "dap_install" doesn't find anything HOT 3
- Add firefox debugger
- Migration from DAPInstall.nvim HOT 12
- Can not find the dependencies. HOT 2
- Beginner's documentation needed HOT 2
- attempt to index field 'info_window' (a nil value)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dap-buddy.nvim.