Skip to content

Commit 15b6374

Browse files
committed
document LUCEE_DEBUGGER_DEBUG and add tips for other IDEs
1 parent 294d718 commit 15b6374

File tree

2 files changed

+58
-3
lines changed

2 files changed

+58
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ The simplest and most efficient way to use luceedebug. No JVM configuration requ
4949
| `LUCEE_DAP_PORT` | | Port for DAP server (default: 10000) |
5050
| `LUCEE_DAP_HOST` | | Bind address for DAP server (default: localhost, use `0.0.0.0` for Docker) |
5151
| `LUCEE_DAP_BREAKPOINT` | | Set to `false` to disable breakpoint instrumentation |
52+
| `LUCEE_DEBUGGER_DEBUG` | | Set to `true` to enable verbose debug logging to the console |
5253

5354
Setting `LUCEE_DAP_BREAKPOINT=false` disables breakpoint support but keeps the DAP server running. This is useful if you only want console output streaming without the instrumentation overhead.
5455

examples/docker/README.md

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,69 @@ docker compose up
1111
- Lucee: http://localhost:8888
1212
- DAP debugger: port 10000
1313

14-
Install the [LuceeDebug](https://marketplace.visualstudio.com/items?itemName=DavidRogers.luceedebug) vscode extension,
14+
## VS Code
1515

16-
## Run the demo
16+
Install the [LuceeDebug](https://marketplace.visualstudio.com/items?itemName=DavidRogers.luceedebug) VS Code extension.
1717

1818
- Open this folder in VS Code
1919
- Set a breakpoint in [app/index.cfm](app/index.cfm)
2020
- Press F5 (Run / Start Debugging)
21-
- Switch the to debug console view
21+
- Switch to the debug console view
2222
- Open [http://localhost:8888](http://localhost:8888) in a browser
2323

24+
The VS Code extension adds context menu commands (writeDump, serializeJSON, getMetadata) and hover evaluation for CFML variables. All core debugging features (breakpoints, stepping, variable inspection) are standard DAP.
25+
26+
## Other DAP Clients
27+
28+
Luceedebug uses the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/), so any DAP client that can connect via TCP socket should work. The key requirement is that the `attach` request must include `secret` in its arguments.
29+
30+
### Neovim (nvim-dap)
31+
32+
```lua
33+
local dap = require("dap")
34+
35+
dap.adapters.cfml = {
36+
type = "server",
37+
host = "localhost",
38+
port = 10000,
39+
}
40+
41+
dap.configurations.cfml = {
42+
{
43+
type = "cfml",
44+
request = "attach",
45+
name = "Lucee Docker Debugger",
46+
secret = "my-secret",
47+
pathTransforms = {
48+
{
49+
idePrefix = "${workspaceFolder}/app",
50+
serverPrefix = "/var/www",
51+
},
52+
},
53+
},
54+
}
55+
```
56+
57+
### IntelliJ (LSP4IJ plugin)
58+
59+
Install the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin, then create a DAP Run/Debug configuration:
60+
61+
- **Server tab**: Connect via socket to `localhost:10000` (no command needed, the server is already running)
62+
- **Configuration tab**: Set the JSON to:
63+
64+
```json
65+
{
66+
"request": "attach",
67+
"secret": "my-secret",
68+
"pathTransforms": [
69+
{
70+
"idePrefix": "${workspaceFolder}/app",
71+
"serverPrefix": "/var/www"
72+
}
73+
]
74+
}
75+
```
76+
2477
## How It Works
2578

2679
The Lucee 7.1+ Docker image is used, with with the debugger extension being installed via an env var:
@@ -32,5 +85,6 @@ Three env vars enable it:
3285
- `LUCEE_DAP_SECRET` - authentication secret (must match your launch.json)
3386
- `LUCEE_DAP_PORT` - DAP server port
3487
- `LUCEE_DAP_HOST` - bind address (`0.0.0.0` for Docker, defaults to `localhost`)
88+
- `LUCEE_DEBUGGER_DEBUG` - set to `true` for verbose debug logging to the console
3589

3690
The `pathTransforms` in [.vscode/launch.json](.vscode/launch.json) maps your local `app/` folder to `/var/www` inside the container.

0 commit comments

Comments
 (0)