Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent debugger crashing on circuits with no opcodes (#4283)
# Description ## Problem\* Resolves #4231 The REPL debugger is not handling the case when the compiled circuit has no opcodes and since it assumes there will be some opcodes, it panics on continue. ## Summary\* With this PR, the REPL debugger will start in a "finished" stated in those cases and the DAP will not start the main loop. ## Additional Context This edge case is very unlikely to happen, especially after applying #4185 which changes the default mode for the debugger to Brillig (seems to generate at least a trampoline-like fragment even for empty programs) and after the introduction of debugging instrumentation. Nevertheless it will still be possible (eg. empty program and passing `--acir-mode` option). ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [X] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information