Skip to content

Commit 02f2f37

Browse files
committed
Add note on child process debugging
1 parent 0483271 commit 02f2f37

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,26 @@ be produced by adding `--enable-debug-pack`. These options are mutually exclusiv
152152

153153
## Debugging with Visual Studio
154154

155-
- configure with either `--enable-debug` or `--enable-debug-pack`
156-
- a debug build might bring better experience for dev, but sometimes you want to debug a release build
157-
- `nmake run ARGS=yourscript.php DEBUGGER=1`, that will open a Visual Studio window
158-
- any additional runtime options for PHP or the script executed go to ARGS, too
159-
- select `Debug -> New Breakpoint -> Function Breakpoint` and add a function where the debugger should break
160-
- click `Start`
155+
- Configure with either `--enable-debug` or `--enable-debug-pack`.
156+
- A debug build might bring better experience for dev, but sometimes you want to debug a release build.
157+
- `nmake run ARGS=yourscript.php DEBUGGER=1`, that will open a Visual Studio window.
158+
- Any additional runtime options for PHP or the script executed go to ARGS, too.
159+
- Select `Debug -> New Breakpoint -> Function Breakpoint` and add a function where the debugger should break.
160+
- Click `Start`.
161161

162162
Adding a breakpoint before starting debugging might be not necessary, if a crash is debugged. When such a script runs
163163
under the debugger, the debugger will stop at the crashing point. In that case, a breakpoint can be added
164164
around the crashed code directly.
165165

166+
## Debugging test suite with Visual Studio
167+
168+
The [Microsoft Child Process Debugging Power Tool](https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool)
169+
plugin for Visual Studio is required. After installing it, following these steps
170+
171+
- `nmake test TESTS=ext/myext/tests/sometest.phpt DEBUGGER=1`
172+
- Select `Debug -> Other Debug Targets -> Child Process Debugging Settings` and enable child process debugging.
173+
- If necessary, add a breakpoint and start debugging as described in the previous section.
174+
166175
## Debugging with WinDbg
167176

168177
PHP can also be debugged with the tools from the WinDbg package. There is currently no way

0 commit comments

Comments
 (0)