- ESP-IDF Extension settings
- IntelliSense for code completion and navigation
- Build tasks for compilation
- Flash tasks for uploading to device
- Debug configuration (launch.json)
-
code $HOME/Documents/SUSE/projects/keymaker -
- Press Ctrl+Shift+B (default build task)
- Or: Ctrl+Shift+P → "Tasks: Run Task" → "Build - ESP-IDF"
- Or: Click the ESP-IDF extension icon in the sidebar → Build
-
- Ctrl+Shift+P → "Tasks: Run Task" → "Flash - ESP-IDF"
- Or use the ESP-IDF extension flash button
-
- Ctrl+Shift+P → "Tasks: Run Task" → "Monitor - ESP-IDF"
- Or use the ESP-IDF extension monitor button
- To exit: Press Ctrl+]
-
- Ctrl+Shift+P → "Tasks: Run Task" → "Build, Flash and Monitor"
All tasks are available via Ctrl+Shift+P, "Tasks: Run Task":
| Task | Description | Shortcut |
|---|---|---|
| Build - ESP-IDF | Compile the project | Ctrl+Shift+B |
| Flash - ESP-IDF | Upload to ESP32 | - |
| Monitor - ESP-IDF | View serial output | - |
| Build, Flash and Monitor | Do all three in sequence | - |
| Clean - ESP-IDF | Full clean rebuild | - |
IntelliSense should work automatically. If you see errors:
- Rebuild compile_commands.json:
. $HOME/.espressif/v5.5.3/esp-idf/export.sh idf.py build
- Reload VSCode Window:
- Ctrl+Shift+P, "Developer: Reload Window"
- Select Configuration:
- Bottom right: Click on configuration name
- Select "ESP-IDF"
- Open Extensions: Ctrl+Shift+X
- Search: "ESP-IDF"
- Install: "Espressif IDF" by Espressif
- Build: Click build icon in status bar
- Flash: Click flash icon in status bar
- Monitor: Click monitor icon in status bar
- Device Config: Click gear icon for menuconfig
- SDK Config: Visual menuconfig editor
- IDF Path:
$HOME/.espressif/v5.5.3/esp-idf - Port:
/dev/ttyUSB0 - Target:
esp32 - Flash Type:
UART
- Go to Definition: F12 or Ctrl+Click
- Find All References: Shift+F12
- Rename Symbol: F2
- Format Document: Shift+Alt+F
- Show Problems: Ctrl+Shift+M
- Toggle Terminal: Ctrl+`
- Type and IntelliSense will suggest functions, variables, etc.
- Use arrow keys to navigate suggestions
- Press Tab or Enter to accept
ESP-IDF extension includes snippets for common patterns:
- Type
task→ FreeRTOS task template - Type
gpio→ GPIO configuration template - Type
log→ ESP logging macros
Your launch.json is configured for OpenOCD debugging.
- ESP32 with JTAG pins connected
- OpenOCD configured for your board
- Connect JTAG debugger
- Press F5 or Ctrl+Shift+D → Start Debugging
- Set breakpoints by clicking left of line numbers
- Solution: Reload window (Ctrl+Shift+P → "Reload Window")
- Check that
build/compile_commands.jsonexists - Make sure "ESP-IDF" configuration is selected
- Check: Terminal shows "idf.py: command not found"
- Solution: Tasks auto-source the IDF environment
- If it still fails, verify
idf.currentSetupin settings.json
- Check: Device is connected (
ls /dev/ttyUSB*) - Update: Change
idf.portin settings.json if different
- Reinstall: Remove and reinstall ESP-IDF extension
- Check: Extension requires Python 3.x and ESP-IDF installed