---
title: "Remote Debugging with SSH and VS Code"
description: "A Node.js process running on Render can be debugged from a local VS Code instance by starting it with `node --inspect=9229` and forwarding the debug port over an SSH tunnel (`ssh -N -L 9229:localhost:9229`)."
url: "https://swe.quest/articles/remote-debugging-with-ssh-and-vs-code-d3c247b65e523308"
canonical: "https://render.com/blog/ssh-vscode-remote-debugging"
source: "Render"
published: "2022-02-23"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["debugging","javascript","developer-tools","networking"]
---

# Remote Debugging with SSH and VS Code

A post on [Render](https://swe.quest/sources/render.md), published 2022-02-23, 7 min read, How-to. Original: [https://render.com/blog/ssh-vscode-remote-debugging](https://render.com/blog/ssh-vscode-remote-debugging)

## Summary

A Node.js process running on Render can be debugged from a local VS Code instance by starting it with \`node --inspect=9229\` and forwarding the debug port over an SSH tunnel (\`ssh -N -L 9229:localhost:9229\`). This avoids exposing the inspector port publicly. VS Code attaches through a launch.json "Attach to Remote Program" config with remoteRoot set to the deploy directory. Once attached, breakpoints, variable inspection, call stacks and break-on-exception all work as they do locally, which helps with bugs that only reproduce in the production Linux environment. The Flame Chart Visualizer extension adds live CPU and memory profiling over the same connection.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)

## Prerequisites

- Node.js basics ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- SSH basics
- VS Code debugger

## Keywords

SSH, VS Code, Node.js, Render, port forwarding, Node inspector

## Related posts

- [Let’s Debug a Node.js Application](https://swe.quest/articles/let-s-debug-a-node-js-application-f46c7c5e6bf92ab4.md): Heroku Engineering · 2020-08-03 · Medium · 4 min read · Debugging, JavaScript, Developer tools
  Node.js debugging options range from structured logging to post-mortem analysis.
- [Host a Dev Environment on Render with VS Code and Tailscale](https://swe.quest/articles/host-a-dev-environment-on-render-with-vs-code-and-tailscale-6236fb7c08487752.md): Render · 2021-10-06 · Medium · 17 min read · Developer tools, Containers, Networking, Cloud platforms, Identity & auth
  A self-hosted cloud dev environment can run on Render as a private service, reached over a Tailscale subnet router and edited with VS Code's Remote-SSH extension. code-server works and installs as a PWA, but it lacks some extensions.
- [Use One-Click Deploys for Secure Online VS Code](https://swe.quest/articles/use-one-click-deploys-for-secure-online-vs-code-7d82fbb266e3409d.md): Render · 2021-11-18 · Medium · 6 min read · Infrastructure as code, Deployment, Developer tools, Cloud platforms
  OpenVSCode Server can be deployed on Render by forking Gitpod's repo, adding a minimal Dockerfile that pulls the published image, and defining a persistent disk mount in a render.yaml Blueprint.
- [MCP Horror Stories: The Drive-By Localhost Breach](https://swe.quest/articles/mcp-horror-stories-the-drive-by-localhost-breach-5adbe194ac2f44eb.md): Docker · 2025-09-23 · Medium · 16 min read · Vulnerability research, Application security, AI agents, Browsers
  CVE-2025-49596 (CVSS 9.4) let any website achieve remote code execution on developer machines running MCP Inspector below 0.14.1.
- [The Debugger is Here](https://swe.quest/articles/the-debugger-is-here-13c8e56684fd9503.md): Zed · 2025-06-18 · Medium · 7 min read · Developer tools, Debugging, Rust
  Zed now ships a native debugger built on the Debug Adapter Protocol, with out-of-the-box support for Rust, C/C++, JavaScript, Go and Python.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
