This is a very clever idea!
I agree that the VM is the hardest project in the book. There are many new concepts and you need to learn the Hack architecture and instruction set in great detail.
I learned programming in the days of mainframes, punch cards, and line printers. By reflex, I wrote my Hack assembler to generate a listing file:
// This file is part of the materials accompanying the book
// "The Elements of Computing Systems" by Nisan and Schocken,
// MIT Press. Book site: www.idc.ac.il/tecs
// File name: projects/06/max/Max.asm
// Computes M[2] = max(M[0], M[1]) where M stands for RAM
0 0 @0
1 FC10 D=M // D=first number
2 1 @1
3 F4D0 D=D-M // D=first number - second number
4 10 @OUTPUT_FIRST
5 E301 D;JGT // if D>0 (first is greater) goto output_first
...
I have my VM translator write the VM source lines as comments in the ASM output. Armed with the listing file generated by assembling my VM output I could quickly find the generated code by address, and set breakpoints as needed.
It would have been much quicker to use your trick.
It might be handy to include the VM source line number to make it easier to relate ASM and VM code:
@123 {line number}
@7777
M=0
M=1
--Mark