dvardumper 0.0.1

Variable dumper


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

dvardumper

Variable dumper for D

Usage example

import vardumper.d;

struct MyArray
{
    ubyte[4] ubyteArray;
}

struct MyStruct
{
    align(1):

    string f1;
    int f2 = 4;
    bool b = true;
    MyArray myArr;
    void* voidPointer;
}

int main(string[] args)
{
    auto varDumper = new VarDumper();

    auto s = MyStruct();
    varDumper.dump(s);

    int a = 6;
    varDumper.dump(a, V!a);

    return 0;
}

output:

Dumping var
---------------
app.MyStruct(33) {
  app.MyArray(4) {
    ubyte[4](4) ubyteArray: (unknown type var)
  }
  int(4) f2 = 4
  void*(8) voidPointer: (unknown type var)
  immutable(char)[](16) f1: (unknown type var)
  bool(1) b = true
}
===============
Dumping var [a]
---------------
int(4) a = 6
===============
Authors:
  • Pavel Chebotarev
Dependencies:
none
Versions:
0.0.1 2019-Apr-07
~master 2019-Apr-07
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 4 downloads total

Score:
0.4
Short URL:
dvardumper.dub.pm