lrbarber commented on issue #148:
URL: 
https://github.com/apache/daffodil-vscode/issues/148#issuecomment-3666751361

   Per Steve Lawrence:
   
   The CLI debugger does not support breaking on data location. But the 
Daffodil Debugger API does provide some information that might get you close to 
that.
   
   Daffodil debuggers are created by implementing the EventHandler API:
   
   
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fdaffodil%2Fblob%2Fmain%2Fdaffodil-core%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fdaffodil%2Fruntime1%2Fevents%2FParseEventHandler.scala&data=05%7C02%7Clarry.barber%40nteligen.com%7C1576bbac70c1469fc49608de3d9d6034%7C379c214c5c944e86a6062d047675f02a%7C0%7C0%7C639015943306998347%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6E0Snpcpxw7b38%2F%2B416kICnLgfuopmgFu21%2BS8b1YAo%3D&reserved=0
   
   The way this API works is it calls handlers before and after things happen 
within in Daffodil (before/after an individual internal parser is run, 
before/after elements are created, etc.)
   
   So one option is to record state.bitPos0b when before() is called and 
compare that with state.bitPos0b when after() is called. If the breakpoint data 
location is within that range, then something in Daffodil must have consumed 
that data and you can break. This isn't perfect since you'll only be able to 
break *after* the data has already been consume.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to