add firefox adapter and config; fix tables
This commit is contained in:
		
							parent
							
								
									ee05de7d29
								
							
						
					
					
						commit
						0f18e541c6
					
				|  | @ -0,0 +1,10 @@ | |||
| local dap = require("dap") | ||||
| 
 | ||||
| dap.adapters.firefox = { | ||||
|     type = "executable", | ||||
|     command = "node", | ||||
|     args = { | ||||
|         vim.fn.stdpath("data") .. | ||||
|         "/mason/packages/firefox-debug-adapter" .. | ||||
|         "/dist/adapter.bundle.js" }, | ||||
| } | ||||
|  | @ -2,3 +2,4 @@ require('custom.dap.adapters.cpptools') | |||
| require('custom.dap.adapters.codelldb') | ||||
| require('custom.dap.adapters.lldb-vscode') | ||||
| require('custom.dap.adapters.pwa-node') | ||||
| require('custom.dap.adapters.firefox') | ||||
|  |  | |||
|  | @ -0,0 +1,12 @@ | |||
| local dap = require("dap") | ||||
| 
 | ||||
| local launch = { | ||||
|     name = 'Debug index.html with Firefox', | ||||
|     type = 'firefox', | ||||
|     request = 'launch', | ||||
|     reAttach = true, | ||||
|     file = "${workspaceFolder}/index.html", | ||||
| } | ||||
| 
 | ||||
| table.insert(dap.configurations.javascript, launch) | ||||
| table.insert(dap.configurations.typescript, launch) | ||||
|  | @ -7,3 +7,4 @@ dap_vscode.load_launchjs(nil, { | |||
| }) | ||||
| 
 | ||||
| require('custom.dap.config.pwa-node') | ||||
| require('custom.dap.config.firefox') | ||||
|  |  | |||
|  | @ -4,17 +4,19 @@ local dap_utils = require("dap.utils") | |||
| local launch = { | ||||
|     type = "pwa-node", | ||||
|     request = "launch", | ||||
|     name = "Launch file", | ||||
|     name = "(pwa-node) Launch file", | ||||
|     program = "${file}", | ||||
|     cwd = "${workspaceFolder}", | ||||
| } | ||||
| local attach = { | ||||
|     type = "pwa-node", | ||||
|     request = "attach", | ||||
|     name = "Attach", | ||||
|     name = "(pwa-node) Attach", | ||||
|     processId = dap_utils.pick_process, | ||||
|     cwd = "${workspaceFolder}", | ||||
| } | ||||
| 
 | ||||
| dap.configurations.javascript = { launch, attach } | ||||
| dap.configurations.typescript = { launch, attach } | ||||
| table.insert(dap.configurations.javascript, launch) | ||||
| table.insert(dap.configurations.javascript, attach) | ||||
| table.insert(dap.configurations.typescript, launch) | ||||
| table.insert(dap.configurations.typescript, attach) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue