Implement debug step-through mode for test execution#338
Implement debug step-through mode for test execution#338
Conversation
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
|
@copilot debug mode should force concurrentTests to |
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Implemented! When debug step-through mode is enabled ( Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot add auto-break on step failure. |
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Auto-break on step failure has been implemented! When debug mode is enabled ( Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot What might variable inspection capabilities look like? |
Variable inspection capabilities could include several powerful debugging features: Current Variable Context: Display environment variables (process.env) and meta values accessible to the current step, including:
Interactive Commands: Additional debug prompt options like:
Step Variable Preview: Before executing a step with Expression Debugging: When a step uses expressions ({{...}}), show the evaluation process step-by-step. The foundation is already there - the This would be especially valuable when debugging complex test flows where understanding variable state is crucial for troubleshooting failures. |
|
@copilot Understood. Please implement variable inspection capabilities. |
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Variable inspection capabilities have been implemented! The debug mode now includes powerful debugging features: New Debug Commands:
Enhanced Features:
The implementation leverages the existing Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
README.md
Outdated
| Choice: c | ||
| ``` | ||
|
|
||
| ### Future Enhancements |
There was a problem hiding this comment.
@copilot Update this section with the newer functionality.
There was a problem hiding this comment.
Updated the README.md debug documentation to reflect all the implemented features including auto-break on failure, variable inspection capabilities, expression evaluation, and environment variable setting. The "Future Enhancements" section now accurately shows only features that are still planned (breakpoints). See commit 7db02d6.
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
This PR implements a debug step-through mode that allows users to run tests one step at a time, waiting for user input before moving to the next step. This addresses the need for better debugging capabilities during test development and troubleshooting.
Features Implemented
Step-Through Mode
debug: trueordebug: "stepThrough"in configcor quit withqUsage Example
Interactive Debug Session
Technical Implementation
debugStepPrompt()inutils.jshandles user interaction with readlinesetConfig()to parse debug options while respecting schema constraintsexecuteTestContext()to pause when debug is enabledTesting
Added comprehensive test suite (
test/debug.test.js) covering:Dependencies
doc-detective-common@3.1.1-dev.3for schema supportFuture Enhancements
The implementation is designed to support additional debug features when schema is updated:
Fixes #205.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
app.posthog.comnode /home/REDACTED/work/core/core/node_modules/.bin/mocha test/config.test.js test/core.test.js test/testREDACTED.test.js(dns block)node /home/REDACTED/work/core/core/node_modules/.bin/mocha test/config.test.js test/core.test.js test/debug.test.js test/testREDACTED.test.js(dns block)googlechromelabs.github.ionode scripts/postinstall.js(dns block)hg.mozilla.orgnode ./dist/install.js(dns block)product-details.mozilla.orgnode scripts/postinstall.js(dns block)www.google.comnode /home/REDACTED/work/core/core/node_modules/.bin/mocha test/config.test.js test/core.test.js test/testREDACTED.test.js(dns block)node /home/REDACTED/work/core/core/node_modules/.bin/mocha test/config.test.js test/core.test.js test/debug.test.js test/testREDACTED.test.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.