nbbeeken/dashmips-debugger

Debugger doesn't launch. Stuck loading forever

Closed this issue · 4 comments

Whenever I run the debugger with dashmips (Run Current File) the debugger loads forever and nothing happens. The sever is running.

My python version is Python 3.7.2
My vscode version is Version 1.30.2 (1.30.2)
My OS version is Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64

Hi, thanks so much for giving my little project a try. I believe the issue is something I have fixed in the python module but never pushed so I've just published an update to pypi. pip install -U dashmips should update it to v0.0.10.

If this doesn't fix it go ahead and attempt to use the debugger again, but when it hangs:

  • Bring up the bottom panel with Ctrl+` (or command on mac I believe).
  • Go to the OUTPUT tab
  • Select Extensions from the drop down on the right side

Hopefully some sort of error message will be displayed there so feel free to copy pasta it here and I can go deeper into the cause of the problem.

The first solution didn't work but here is the output

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 168, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 164, in main
    sys.exit(prog_args.func(prog_args))
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 19, in main_compile
    program = preprocess(args.file)
  File "/usr/local/lib/python3.7/site-packages/dashmips/preprocessor.py", line 34, in preprocess
    unprocessed_labels, unprocessed_code = split_to_sections(linesofcode)
  File "/usr/local/lib/python3.7/site-packages/dashmips/preprocessor.py", line 80, in split_to_sections
    raise MipsException("first line must be .text/.data")
dashmips.mips.MipsException: first line must be .text/.data(node:23717) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'replace' of undefined(node:23717) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.(node:23717) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'breakpointsFromVscode' of undefinedTraceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 168, in <module>
    main()
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 164, in main
    sys.exit(prog_args.func(prog_args))
  File "/usr/local/lib/python3.7/site-packages/dashmips/__main__.py", line 19, in main_compile
    program = preprocess(args.file)
  File "/usr/local/lib/python3.7/site-packages/dashmips/preprocessor.py", line 34, in preprocess
    unprocessed_labels, unprocessed_code = split_to_sections(linesofcode)
  File "/usr/local/lib/python3.7/site-packages/dashmips/preprocessor.py", line 80, in split_to_sections
    raise MipsException("first line must be .text/.data")
dashmips.mips.MipsException: first line must be .text/.data(node:23962) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'replace' of undefined(node:23962) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.(node:23962) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'breakpointsFromVscode' of undefined

Ayyyyy fixed. Forgot to put .text. Thanks a lot buddy appreciate it a lot. For my class they are making us use this http://www.ece.gatech.edu/~scotty/misasim/ and it isn't really working out

Ah I see the issue, the project is very much in its infancy and is not very robust.
The error "first line must be .text/.data" is very literal in that the first line of the file (excluding comments) must be either a .data or .text section identifier.
I gotta warn you that VERY few instructions have been implemented it is all very much a WIP.