Giter Site home page Giter Site logo

Comments (15)

sano98 avatar sano98 commented on September 24, 2024

Used versions:

hxcpp: 4.0.8
hxcpp-debug-server: 1.1.1
lime: 7.2.1
openfl: 8.8.0
hscript: 2.3.0
haxe: 4.0.0-rc.1

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

For now, iterpreter, which executes expressions for conditional breakpoints has access only to properties of object, where breakpoint was hit, and know nothing about Std.is, for example.

Maybe, some kind of custom initialization of interpreter will be usefull, how do you think?

For e.g. api can looks like:

DebugServer.interp_expose("Std", Std);

from hxcpp-debugger.

Gama11 avatar Gama11 commented on September 24, 2024

Shouldn't we just expose top-level types such as Std, Math, etc by default?

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

Hm.. Sounds more user friendly than my solution - I like it :) But how many of top-level types average project use? It can significantly slowdown everything, if someone sets conditional breakpoint in game loop for e.g. ( For now, iterpreter initializes each time conditional breakpoint met )

from hxcpp-debugger.

Gama11 avatar Gama11 commented on September 24, 2024

For now, iterpreter initializes each time conditional breakpoint met

Why?

from hxcpp-debugger.

sano98 avatar sano98 commented on September 24, 2024

Just from a user perspective: When I run the debugger to identify a nasty problem, I generally don't care very much about slowdowns.

Once the problem is found, I can remove the breakpoint and everything should be back to full speed, right?

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

Why?

Because, all varialbles with thier values, available in the line of breakpoint, need to be exposed to iterpreter.

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

I just thought, that we can hold all top-level types in static member of interpreter, and expose it once on debug session start - it must work pretty fast. Will try.

Can I rename an issue?

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

please test it with last commit, and reopen if it doesn't work for you for some reason

from hxcpp-debugger.

Gama11 avatar Gama11 commented on September 24, 2024

Seems to basically work. :) But I guess right now stuff you want to use still needs to be exposed manually?

from hxcpp-debugger.

Gama11 avatar Gama11 commented on September 24, 2024

I guess cpp.vm.Debugger.getClasses() must return an empty list in my case?

Anyway, I'll rename staticVariables to globals for now (since the classes you're adding to it aren't static vars) and make it read-only, and release a 1.2.0.

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

Found, that top-level types, declared inside hxcpp library, not presented in result of cpp.vm.Debugger.getClasses() call, so have add it manually (Math, String).

By the way, I have exposed other types too in order to use them in expressions, for e.g. flixel.FlxSprite.

from hxcpp-debugger.

Gama11 avatar Gama11 commented on September 24, 2024

Seems to work great now. πŸ‘

from hxcpp-debugger.

sano98 avatar sano98 commented on September 24, 2024

grafik
When trying to use the condition with a classtype of my project, it does not trigger.
Am I missing something?
Does this not work, as my own classes are not exposed?
Is this a resolution thing - would I have to write the absolute file path of the Apple class?
Or is it generally not possible to do what I'm trying? Thx!

from hxcpp-debugger.

nulld avatar nulld commented on September 24, 2024

from hxcpp-debugger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.