Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot debug procs using /database/query #45

Open
DamianX opened this issue Aug 15, 2021 · 1 comment
Open

Cannot debug procs using /database/query #45

DamianX opened this issue Aug 15, 2021 · 1 comment

Comments

@DamianX
Copy link

DamianX commented Aug 15, 2021

/proc/enable_debugging(mode, port)
	CRASH("auxtools not loaded")

/proc/auxtools_stack_trace(msg)
	CRASH(msg)

var/early_init/early_init = new
/early_init/New()
	init_debugger()

/proc/init_debugger()
	var/auxtools_path = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")

	if(fexists(auxtools_path))
		call(auxtools_path, "auxtools_init")()
		enable_debugging()

/client/verb/stuff()
	..()

	var/database/db = new("mydb.db")
	var/database/query/q = new("SELECT * FROM my_table WHERE name=?", "test")

	if(q.Execute(db) && q.NextRow())
		return q.GetRowData()

Put this in a new project, enable BYOND's debugging, place a breakpoint on the line with var/database/query/q.
Attempting to step through it will result in the process hanging. This is in the output console:

Debug Server: "Pausing execution (reason: Breakpoint)"
Debug Server: "Pausing execution (reason: Step)"
[main] Error responding to "variables": timed out waiting for response
Debug client disconnected
Debug server thread finished
[main] Error responding to "stepIn": timed out waiting for response
[main] Error responding to "continue": timed out waiting for response
@willox
Copy link
Owner

willox commented Jun 27, 2022

possibly fixed by byond 514.1585?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants