Comments (12)
👍
Btw. I need to rethink debugme
soon, because it seems to conflict with R-devel (https://cran.rstudio.com/web/checks/check_results_debugme.html), I suspect that this is because of the JIT being enabled in R-devel...
from debugme.
Recursing into environments needs to be done with care, because as soon as you have reference semantics, you might have circular references and circular data structures. So we need to keep track of which environments we are already instrumenting. Probably by using the address of the environment.
from debugme.
For R6 to work, I also need to go inside lists. Hopefully this won't cause any problems.
from debugme.
Thanks, this seems to work for batchtools.
However, I noticed that the instrumentation does not work properly with inheritance. Here is a simple example using https://github.com/mllg/bugme:
bar = Bar$new(x = 12)
print(bar$getxsquare)
getxsquare()
gets instrumented twice.
from debugme.
Oh, yeah, of course. I will somehow mark the already instrumented functions to avoid instrumenting them again.
from debugme.
You could port data.table::address()
to debugme which gives you addresses for functions and environments.
from debugme.
That requires C code, unfortunately, so I would avoid it if possible.
from debugme.
Unless I do some .Internal
hack.....
from debugme.
5 lines of C code vs obscuring a call to .Internal()
and violating CRAN policies? 😕
SEXP address(SEXP x) {
char buffer[32];
snprintf(buffer, 32, "%p", (void *)x);
return(mkString(buffer));
}
What's wrong with C?
from debugme.
It makes debugme
heavier, as you either need to rely on CRAN binaries or have a compiler.
from debugme.
Actually, I can also just change the debug string, so that the second run does not pick it up.
from debugme.
Actually, I can also just change the debug string, so that the second run does not pick it up.
👍
from debugme.
Related Issues (20)
- Handle repetitive messages better
- Make it easier to go into "debug mode" HOT 12
- debug levels? HOT 4
- Add release notes 👾
- Enable time stamp mode manually for terminal output
- Problem configuring debugme for plumber application HOT 6
- Suppress time stamp diff for a specific call
- WISH: Near-zero overhead assertions HOT 2
- Use comments instead of strings HOT 4
- Allow tags
- Plans for V2
- Implement using conditions HOT 4
- debugme, package support and datasets HOT 2
- FR: Show file and line with each debug message HOT 1
- Do debug levels still work? HOT 3
- Document integration with plogr HOT 1
- debugme modifies data.frame to list inside R6 class field
- still calculating unused debugs? HOT 1
- debugme sets .Random.seed on load HOT 13
- Move `master` branch to `main` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debugme.