knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
645 stars 75 forks source link

backtrace: highlight frames that point to local code #200

Closed japaric closed 3 years ago

japaric commented 3 years ago

using the heuristic: if the file location of the function is relative to the current directory then it's "local code"

before: Screenshot from 2021-05-12 18-47-40 after: Screenshot from 2021-05-12 18-46-03

I don't have too many opinions about how to highlight these frames so treat the above as a strawman proposal

cc #139 @Lotterleben

jonas-schievink commented 3 years ago

As a followup, we might be able to check if the path is part of the containing Cargo workspace instead, that might improve the accuracy a bit.

bors r+

bors[bot] commented 3 years ago

Build succeeded:

Lotterleben commented 3 years ago

This is brilliant!