Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
break <line-number>
command
This makes it much easier to find the correct place to add a break point while debugging a program. For example, now one can do the following: ``` $ cd test_programs/execution_success/merkle_insert/ $ nargo debug [merkle_insert] Starting debugger At opcode 0: BRILLIG CALL func 0: PREDICATE = %EXPR [ 1 ]% inputs: [Single(Expression { mul_terms: [], linear_combina [...] > next At opcode 0.17: Const { destination: MemoryAddress(21), bi [...] At [...]/test_programs/execution_success/merkle_insert/src/main.nr:12:3 7 ... 8 new_root: pub Field, 9 leaf: Field, 10 index: Field, 11 mimc_input: [Field; 4] 12 -> ) { 13 assert(old_root == std::merkle::compute_merkle_ [...] 14 15 let calculated_root = std::merkle::compute_merk [...] 16 assert(new_root == calculated_root); 17 18 let h = mimc::mimc_bn254(mimc_input); 19 // Regression test for PR noir-lang#891 20 std::println(h); 21 assert(h == 18226366069841799622585958305961373 [...] 22 } > break 18 Added breakpoint at opcode 0.1274 > continue (Continuing execution...) Stopped at breakpoint in opcode 0.1274 At opcode 0.1274: Const { destination: MemoryAddress(36), [...] At /home/stan/code/repos/noir/test_programs/execution_succ [...] 13 ... 14 15 let calculated_root = std::merkle::compute_merk [...] 16 assert(new_root == calculated_root); 17 18 -> let h = mimc::mimc_bn254(mimc_input); 19 // Regression test for PR noir-lang#891 20 std::println(h); 21 assert(h == 18226366069841799622585958305961373 [...] 22 } > ```
- Loading branch information