breakpoint in test

I believe it’s a stupid question and there’s something i don’t get about testing and debugging, but how can i make breakpoints work inside tests?

For example, i want to debug some model method and instead of requesting some action in browser and switching back to netbeans i wnat to just press shift+F6 and see what’s going on.

Is it even possible? What configuration required for this to work?

Just log what you need would do what you want, like




Yii::log('myModel has fetch '.$num.' rows');



Well if you know how to make logs appear in testcase output i would be glad to hear that 8)

What i want is to have abiltity to debug application components without need to switch between browser and IDE. I’ve figured that testCases would fit that (you need to run “debug file” command in Netbeans on testcase for that to work), and it even worked for some time, but there’re some problems:

[list=1]

[*]Don’t know how to access logs from testCase

[*]Some weird behavior when debugging, related to magic methods i think:

[/list]

When no breakpoint i get:

But when i set breakpoint on that line i get an exception when i "step over"

And there is the line:




$this->assertFalse($page1data['rows'] == $page2data['rows'], 'different pages data are not different');



As you see, no params accessed in that line 8(

Me stoopid! :angry:

I forgot about netbeans watch ($this->params) 8(( That’s who was messing with me

Netbeans should really add some sort of console for evaluation during debug session.