The VS Code extension

New projects ship with a typeCAD/pcb extension already inside. It displays the compiled board alongside your code — hovers on components and nets, a live board viewer with fabrication, electrical, and thermal views, and cross-probing in both directions. Nothing to install from the marketplace.

workflow

Installation

typecad-pcb create copies the compiled extension into each project's hw/.vscode/extensions/ folder, where VS Code (1.85+) picks it up workspace-scoped — no marketplace, no global state. Open the generated workspace file and it's there; open the same folder without VS Code and nothing changed.

Example first

terminal
npx @typecad/pcb create   # the extension lands in hw/.vscode/extensions/
code typecad_project.code-workspace
feature

Pin hovers

Hover a component variable anywhere in src/ and the extension shows everything the compiled board knows about that part.

Example first

On the hoverWhat you see
IdentityReference, value, footprint, and placement — position, rotation, side
PadsPer-pad table: pad number, net, signal type, connected / unconnected
View on boardA link on the hover zooms the board viewer to that component
Missing partsA declared component absent from the compiled board gets an explanation, not silence
feature

The board viewer

typeCAD/pcb: View Board opens a panel rendering the compiled board. A switcher under the board title selects one of six views, all sharing one SVG frame — pan/zoom, the ruler, DRC markers, search, and cross-probing work in every one of them.

Example first

ViewWhat it shows
Gerber viewFab output layer by layer — visibility and opacity controls, a fab report (dimensions, trace lengths, drill table), and DRC markers when a typecad-pcb drc report exists
PCBA viewA themed 2D assembled-board render — substrate, soldermask, silkscreen, and Fritzing-style component glyphs drawn from gerber X2 pad attributes, no board file or KiCAD needed
Blueprint viewThe board as an engineering drawing — paper and ink outlines, dimension lines, a title block, and hatched zone pours
ngspice viewThe electrical view — traces colored by net voltage, parts by power, animated current flow, and the solved operating point on hover
Copper ΔTThe thermal view — where the layout heats up at this operating point: wires, vias, pours, and the FR4 itself as a heat field
LayoutArrange the board by hand — drag parts, draw and trim copper with the board rules watching, then apply & rebuild writes the session back into your TypeScript (see the Layout view news post)

Every view

ToolWhat it does
Pan / zoom / fitAll views share one SVG frame — one viewport, every render
RulerMeasure with shift-angle snap
Component searchFind a designator on the board
Net highlightingClick copper to light up a net — the match pops against a dimmed board
Hover readoutStatus-line readout with source references, e.g. R1 { source r1 }
Themes & exportDark / light themes, SVG and PNG export
feature

ngspice view

The electrical view: white paper, near-black traces, semi-transparent components. The data lands after typecad-pcb simulate solves the DC operating point and leaves build/<board>_op.json beside the netlist — the viewer picks it up like a DRC report.

Example first

terminal
typecad-pcb build       # board + netlist into ./build/
typecad-pcb simulate    # solves the operating point → build/<board>_op.json
# the ngspice + Copper ΔT views light up on the next viewer refresh
Layer of the viewWhat you see
Trace heat mapEvery trace colored by its net's solved voltage, with a volt legend and range
Part heat mapComponents colored by dissipated power on a log scale
Current flowAnimated particles along the copper, driven by the signed per-net currents — direction and magnitude at a glance
Hover readoutHover a trace for the operating point: net voltage plus the connected devices' current and power
All copper layersTop layer solid; deeper layers drawn as construction-line centerlines with their real widths carried along for the models
feature

Copper ΔT

The thermal view — 'given this operating point, where is the layout thermally stressed?' It builds on the same solved currents as the ngspice view; the board stackup (build/<board>_stackup.json, auto-discovered) feeds per-layer copper weight into the model. The board renders as near-monochrome graphite with an incandescent ramp, and zero-current copper stays inert.

Example first

ElementHow it reads
WiresColored by IPC-2221 temperature rise from each wire's solved current and its real gerber width — a wire sized for its current reads its rated rise; a neck-down lights up
Zone poursA 2D sheet-resistance solve over the actual fill polygon, driven by per-pad current injections — heating appears where the copper funnels, and stitch-via bottlenecks show as hot rings
ViasRated by the IPC-2152 barrel formula on the drilled diameter; pads color like wires so a stressed via ring reads at a glance
The board itselfA stacked two-layer steady-state FR4 field: wire, via, and pour losses heat the laminate, conducted and convected — with component self-heating injected at the pads. Rendered as one continuous field over the whole board
Hover readoutThe status bar reports the temperature under the cursor — the trace or via's own rise over copper, the sampled FR4 field elsewhere, each as rise + absolute
ControlsAmbient temperature, allowed rise, and a color-by-margin mode; the legend shows the board's own ΔT range
feature

Blueprint view

The board drawn as a fabrication drawing — the same layers as the PCBA render, in ink on paper instead of soldermask and silk.

Example first

On the drawingWhat it gives you
Paper & inkBlueprint paper, the board and component outlines in ink strokes, thin outlined pads, and drill marks
DimensionsFabrication-drawing dimension lines with extension lines and arrowheads measure overall width and height; corner ticks mark the four extents
Title & info blocksA title block below the board (name, date, dimensions) and an info block listing the source layers, units, side, and version
Pours & tracesZone pours render as explicit diagonal hatch lines clipped to the outline; traces keep their real widths
DesignatorsLabels come from the fab layer, with synthetic labels only when the layer set has none
feature

Cross-probing

The board, the source, and the diagnostics stay linked in every direction — nets as well as components.

Example first

DirectionHow
Editor → boardComponent hovers carry a view-on-board link; hovering the net name in a pcb.net(...) / pcb.route(...) call highlights that net's traces. Palette equivalents — View Component / View Net on Board — prompt for a name seeded from the cursor
Board → editorDouble-click a trace or a pad to jump to the line that declared or routed its net; double-click a component outline to jump to its declaration
Problems → boardUnconnected-pad, single-pin-net, and DRC diagnostics carry Show R1 on board / Show net VCC on board actions that zoom the viewer to the culprit
workflow

Ambient board state

The addon keeps a live model of the project: what's built, what's stale, and what's wrong — the same ambient style as the typeCAD/hal extension.

Example first

SurfaceWhat it shows
Status barThe build target at a glance — rd_skeleton · 28 parts · 3 unconnected · 2E 5W — with a stale flag when hw sources are newer than the built board. Click opens the Board viewer
Build Board CodeLensA ▶ Build Board lens on every TypeScript file in the hw folder — one click runs npm run build in a reused terminal, and an open viewer refreshes when the build lands
Problems paneUnconnected pads and single-pin nets surface as warnings aimed at the declaring source lines; Run DRC maps kicad-cli violations the same way, and its counts land in the status bar
Declaration chipsAn italic "R1 · 2 unconnected pads" chip sits after the declaration line in the editor
NotificationsEvery dead end is actionable — a "no compiled board" notice carries a Build Board button; render failures carry Open Output
workflow

Stays current

Every npm run build re-renders the viewer automatically — the refresh waits for the board file to stop changing, so a busy build doesn't flash half-written panels. Viewport, layer settings, view, highlights, and an open panel all survive rebuilds and window reloads.

reference

Commands

All commands live under the typeCAD/pcb category in the command palette.

Example first

Command IDTitle
typecad-pcb.buildBoardBuild Board — npm run build in a reused terminal
typecad-pcb.viewBoardView Board — open the board viewer panel
typecad-pcb.viewComponentView Component on Board — zoom to a designator
typecad-pcb.viewNetView Net on Board — highlight a net's copper
typecad-pcb.runDrcRun DRC — violations land in Problems at their source lines
typecad-pcb.diffBoardDiff Board vs HEAD — the built board's visual diff in a panel
typecad-pcb.refreshBoardDataRefresh Board Data — re-read the built board
© 2026 typeCAD — code-defined electronics github