- Auto completion
- Code navigation
- Debug JS running in Firefox
(setq js-indent-level 2)
$ pacman -Sy nodejs
(use-package lsp-mode)
(add-hook 'prog-mode-hook #'lsp)
(use-package dap-mode
:config
(dap-auto-configure-mode)
:bind
(("<f7>" . dap-step-in)
("<f8>" . dap-next)
("<f9>" . dap-continue)))
(require 'dap-firefox)
M-x dap-firefox-setup
{
"$id": "1",
"innerException": null,
"message": "Request was blocked due to exceeding usage of resource 'Count' in namespace 'AnonymousId'. For more information on why your request was blocked, see the topic \"Rate limits\" on the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=823950).",
"typeName": "Microsoft.TeamFoundation.Framework.Server.RequestBlockedException, Microsoft.TeamFoundation.Framework.Server",
"typeKey": "RequestBlockedException",
"errorCode": 0,
"eventId": 3000
}
https://marketplace.visualstudio.com/items?itemName=firefox-devtools.vscode-firefox-debug
C-h v RET dap-firefox-debug-program RET
$ mkdir -p ~/.emacs.d/.extension/vscode/\
firefox-devtools.vscode-firefox-debug/
$ unzip ~/tmp/firefox-devtools.vscode-firefox-debug-2.9.8.vsix \
-d ~/.emacs.d/.extension/vscode/\
firefox-devtools.vscode-firefox-debug/
(setq dap-firefox-debug-program
'("node" "/home/torstein/.emacs.d/.extension/vscode/firefox-devtools.vscode-firefox-debug/extension/dist/adapter.bundle.js"))
```lisp
---
```text
M-x dap-debug
$ firefox -start-debugger-server &
- lsp-mode
- dap-mode
- vscode-firefox-debug