Skip to content
PaskalCPP
Tools

The editor

The PaskalCPP Editor: an Electron application whose editing surface is Monaco, driving the compiler's own language server and debugger.

Starting

pcpp editor [files] starts the editor, res\editor\editor.exe beside pcpp.exe, and opens the files given.

  • The editor runs one pcpp --lsp for its whole lifetime: every language feature comes from the compiler's own frontend. See The language server.
  • Everything the editor keeps lives in data\ beside editor.exe, never in AppData: state.json (the explorer's folders, open tabs, window and layout, the toolbar's level and target, the debug host per dll) and settings.json.
  • File > Show Examples shows the bundled examples folder (res\examples) in the explorer; it is on by default.

Menus and keys

MenuCommands
FileNew (Ctrl+N), Open (Ctrl+O), Open Folder, Close All Folders, Show Examples, Save (Ctrl+S), Save As (Ctrl+Shift+S), Save All, Rename, Quit
EditUndo, Redo, Cut, Copy, Paste, Select All, Find (Ctrl+F), Replace (Ctrl+H), Format Document (Shift+Alt+F)
GoGo to Symbol in Workspace (Ctrl+T), Show Call Hierarchy (Shift+Alt+H)
BuildBuild (Ctrl+B), Run (Ctrl+F5), Stop (Shift+F5)
DebugStart Debugging / Continue (F5), Step Over (F10), Step Into (F11), Step Out (Shift+F11), Pause (F6), Stop Debugging
Viewzoom, full screen, developer tools
PreferencesFormat Settings
HelpReport Issue, About PaskalCPP

Build and Run

Build and Run take a saved .pcpp file (an unsaved one is refused) and run pcpp <file> -opt <level> -t <target> --defaults --progress in pcpp.exe's folder, so the program builds into the same output folder as a console build there. The command line is the first line of OUTPUT.

  • The toolbar's optimize level is one of debug, safe, fast, small, and its target one of x86_64-windows-gnu, x86_64-linux-gnu; the first of each is the default. With --defaults the source's own @optimize / @target wins over the toolbar. A level saved under a retired name (release_fast) is read back as its new one (fast).
  • Run adds -r --terminal <pipe>: the program's terminal is the TERMINAL tab (its keys, its size), while pcpp's own lines stay in OUTPUT.
  • One build or run at a time, and none while a debug session runs; Stop ends the compiler and the program it started.

Panels

The bottom panel has the tabs OUTPUT, TERMINAL, PROBLEMS (with a count), CALL HIERARCHY and DEBUG. OUTPUT shows pcpp's text without colour codes and redraws its in-place progress line.

Settings

Preferences > Format Settings opens settings.json in a tab, created with the defaults the first time; saving it applies it at once.

KeyDefaultRange
indentSize21..8
useTabsfalse
spaceAroundAssigntrue
spaceAroundOperatorstrue
spaceAfterCommatrue
spaceBeforeColonfalse
spaceAfterColontrue
maxBlankLines10..9
trimTrailingWhitespacetrue
finalNewlinetrue
maxLineLength8060..200
formatOnSavefalse

Reporting an issue

Help > Report Issue opens the form at paskalcpp.org/report in its own window, with the editor's version and platform filled in. A right-click on a PROBLEMS row offers Report This Error, which also fills in that row's diagnostic code.

The report window stays on the form's site; a link to github.com opens in the browser. When the form cannot be reached the editor says so and gives the address.