https://github.com/juancarlospaco/nim-printdebug
Print Debug for Nim, tiny 3 lines Lib, C Target.
https://github.com/juancarlospaco/nim-printdebug
debug debug-scripts nim nim-lang
Last synced: 15 days ago
JSON representation
Print Debug for Nim, tiny 3 lines Lib, C Target.
- Host: GitHub
- URL: https://github.com/juancarlospaco/nim-printdebug
- Owner: juancarlospaco
- License: mit
- Created: 2018-09-24T23:55:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-25T00:48:20.000Z (over 7 years ago)
- Last Synced: 2025-01-26T14:48:40.625Z (over 1 year ago)
- Topics: debug, debug-scripts, nim, nim-lang
- Language: C
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nim-PrintDebug
Print Debug for Nim, tiny 3 lines Lib, C Target.
It can print the variable name, value, source full file path and line number.
For `char` it prints the integer number too. Works when **not** build for Release.
# Use
```nim
import printdebug
var a = 42
idebug(a)
```
- Run the module itself for an Example.
# Install
- `nimble install printdebug`
# idebug versus echo
idebug output:
```nim
/tmp/nimcache/d/probando/probando.c:184: a_2rnMjDfJU69afSGaL7CTTDA = 3
/tmp/nimcache/d/probando/probando.c:186: b_sw8ZYR5hWNvML7CcjrPwkQ = 42
/tmp/nimcache/d/probando/probando.c:188: c_lQAeo5PI3JAPlfNIWPH79bA = 3.14
/tmp/nimcache/d/probando/probando.c:190: d_H9c4CM9abttjArqE9asp7imUg = z
/tmp/nimcache/d/probando/probando.c:192: e_VE76pRVq9aqJNDCqxzP7u4w = 3
/tmp/nimcache/d/probando/probando.c:194: f_Yg3H7j9aNXp13XcVjw1pdug = 42
/tmp/nimcache/d/probando/probando.c:196: g_u2dRosJ5dbpg1SDH9aO9bZKQ = 3.14
/tmp/nimcache/d/probando/probando.c:198: h_GjCvcrfdrjTJpUMO9aT0s1g = z
```
echo output:
```nim
3
42
3.14
z
3
42
3.14
z
```
# Requirements
- None