E0005¶
- Code
E0005
- Message
Program is not a Structured Text source or compiled .iplc container
The program selected for debugging is neither a Structured Text source nor a
compiled .iplc container.
The IronPLC debugger can launch either a Structured Text source file, which it
compiles first, or an already-compiled .iplc container, which it runs
directly. A program of any other type is rejected before it reaches the
debug server, because handing an unrelated file to the server would fail with
an opaque “invalid magic number” error instead of a message you can act on.
A common way to hit this is "program": "${file}" combined with the wrong
editor being focused: ${file} follows the active editor, so pressing
F5 while launch.json is focused makes launch.json the
program.
Solutions:
Point at a source file: Set
programto a.st(or other Structured Text) file that you want to debug.Point at a container: Set
programto a compiled.iplcfile produced by ironplcc compile.Check ${file}: If you use
"program": "${file}", focus the Structured Text editor before pressing F5, or replace${file}with an explicit path such as${workspaceFolder}/main.stso the program does not depend on the active editor.
Think IronPLC is wrong about this?
If you believe this diagnostic is incorrect, open an issue on GitHub with a small sample that demonstrates the problem.