If you see no logs at all in the Figma Plugin Console, the conversion code isn't executing.
- In Figma: Plugins → Development → Show/Hide Console
- This opens a separate DevTools window for plugin code
- This is DIFFERENT from the browser's DevTools (F12)
- In the Figma Plugin Console, you should see immediately:
🚀 Plugin code.ts loaded and running 📡 Setting up message listener... - If you DON'T see these, the plugin didn't load at all
- In Figma: Plugins → Development → figma-html-push
- The plugin UI window should open
PASTE THIS INTO THE TEXTAREA:
{
"type": "CANVAS",
"name": "Debug Test",
"children": [
{
"type": "body",
"text": "Hello World",
"styles": {
"backgroundColor": "rgb(255, 255, 255)",
"fontSize": "16px",
"color": "rgb(0, 0, 0)"
},
"position": {
"absolute": {
"x": 0,
"y": 0,
"width": 200,
"height": 100
}
}
}
]
}Expected logs in Plugin Console:
📨 Message received from UI: convert-json
📦 Full message: {"type":"convert-json"...
✅ convert-json message detected
🔍 JSON Data received: {"type":"CANVAS"...
🔍 JSON type: CANVAS
🔍 Has children: true
🔍 Children count: 1
✅ Creating node: body
📐 Position: x=0, y=0, width=200, height=100
✅ Resized to 200x100
- Wrong console: You're looking at browser console, not plugin console
- Plugin not loaded: Try closing and reopening the plugin
- Build not updated: Run
npm run buildagain
- UI is not sending the message
- Check: Did you click the "Convert" button?
- Check: Is there JSON in the textarea?
- Message received but JSON validation failed
- Check console for error messages starting with ❌
- JSON received but conversion failed
- The converter should show which nodes are created
- Check for ❌ error logs
Run in Figma Plugin Console (not browser):
// Test if console works
console.log("✅ Figma Plugin Console is working");
// Check if plugin API is available
console.log(
"Figma API:",
typeof figma !== "undefined" ? "✅ Available" : "❌ Not available",
);- Built: ✅ 35.8 KB
- Logging: ✅ Comprehensive debug logs added
- Test JSON: ✅ Created (test-figma-console.js)
- See all logs but still 100×100 block: Position logic issue (next fix)
- See 🔍 logs but no ✅ logs: Converter not creating nodes (check node-utils)
- See nothing: Follow "Troubleshooting No Logs" above