Just have a look at the structure of the examples directory,
as you can see, such directories have just one level:
they don't have any subdir (like your src).
Do you really need the "src" level in the directory?
Just to start, try to follow the same structure of the "examples" dir,
just follow me in this example with "simple.cc" in scratch dir,
and then change it with your file.
$ cd /home/wns3/repos/ns-3-allinone/ns-3.10/
$ mkdir -p examples/simplex
$ cp scratch/simple.cc examples/simplex
$ cp examples/waf examples/simplex
$ vim examples/simplex/wscript
-----copy THIS-----
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil;
coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('simple', [''])
obj.source = 'simple.cc'
-----copy THIS-----
save and exit
$ ./waf ///you should have an output like this
Waf: Entering directory `/home/wns3/repos/ns-3-allinone/ns-3.10/build'
[1299/1462] cxx: examples/simplex/simple.cc -> build/debug/examples/
simplex/simple_1.o
[1430/1462] cxx_link: build/debug/examples/simplex/simple_1.o -> build/
debug/examples/simplex/simple
Waf: Leaving directory `/home/wns3/repos/ns-3-allinone/ns-3.10/build'
'build' finished successfully (2.486s)
run it
$ ./waf --run examples/simplex/simple
Waf: Entering directory `/home/wns3/repos/ns-3-allinone/ns-3.10/build'
Waf: Leaving directory `/home/wns3/repos/ns-3-allinone/ns-3.10/build'
'build' finished successfully (0.539s)
....output....
About the debugger, do you use emacs or vi/vim for editing your files,
or you use Netbeans or Eclipse? The link I sent works for Eclipse
through gdb.