🛠️ Step-by-Step Error Resolutions
1. Agent Fails to Start: Missing commitSha
Error Message:
- Cause:
InSitu.start()was called without acommitShaoption, and theGIT_COMMITenvironment variable is either empty or set to"unknown". The agent refuses to run because it cannot map source code coordinates safely without a specific git reference. - Solution: Provide the active commit SHA during build-time or runtime:
2. Probe Gutter Icon Shows Hollow Orange Dot (Agent Not Going Live)
- What you see: A probe is successfully inserted inside VS Code, but the gutter indicator stays orange.
- Cause: The VS Code extension has registered the probe on the server, but the SDK agent is either offline, unreachable, or configured with mismatched service coordinates.
-
Solution:
1
Verify Service ID Alignment
Open your local project’s.hprcfile and compare itsserviceIdexactly (case-sensitive) with theserviceIdpassed toInSitu.start()in your server code:.hprcsrc/app.ts2Check the Broker URL Connection
Ensure your container can resolve and access the Broker server. Try curling the health endpoint directly from inside the application’s hosting shell:3Match Environments
Verify that the environment dropdown selected inside your VS Code extension panel (e.g.,production) matches theenvironmentparameter in your SDK initialization.
3. Gutter Gutter Icon Shows Error Status (Solid Red Dot)
- What you see: A probe’s status instantly transitions to
ERROR. - Cause: The agent received the instruction but could not parse the line coordinates or compile the breakpoint hook.
- Solution:
- Non-Executable Line: Check if you placed the probe on a line containing comments, blank spaces, imports, type annotations (
interface,type), or curly braces. Move the probe to an executable line containing a statement. - Missing Source Maps: For TypeScript or compiled projects, ensure
"sourceMap": trueis enabled in your compiler config, and thatdistLocationpoint to your built outputs so the agent can match coordinates.
- Non-Executable Line: Check if you placed the probe on a line containing comments, blank spaces, imports, type annotations (
4. Local Docker Connection Fails (http://localhost:3001)
- What you see: When running the SDK agent inside Docker but hosting the InSitu broker locally, the agent fails to connect.
- Cause: Inside a Docker container,
localhostresolves to the container’s own loopback interface, not your machine’s host ports. - Solution: Update your containerized agent’s
brokerUrlconfig to use the host loopback alias:
❓ Frequently Asked Questions
Does attaching InSitu slow down my production service?
Does attaching InSitu slow down my production service?
Capture overhead depends on your workload, probe locations, and captured data. Agents include safety limits that can suspend probes when those limits are exceeded. See the Python SDK guide for Python behavior.
How does the agent handle sensitive data or compliance?
How does the agent handle sensitive data or compliance?
InSitu applies redaction inside the application process. Coverage depends on your configured key and value patterns and the probe expressions you use. In Python, key patterns do not protect scalar watch results; see the Python redaction guide.
Can I use InSitu without TypeScript source maps?
Can I use InSitu without TypeScript source maps?
Yes, if your code executes directly without transpilations (e.g. standard ES6 Node.js). If you use TypeScript, Babel, Esbuild, or Webpack, source maps are strictly required for the agent to match your source files back to compiled JS on disk.
How do I enable deep debug logs for the SDK?
How do I enable deep debug logs for the SDK?
InSitu utilizes standard namespace debug log flags. Export the
DEBUG flag before launching your service to isolate issues: