how do i debug an FFGL?

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
shimla
Met Resolume in a bar the other day
Posts: 3
Joined: Sat Apr 27, 2019 13:36
Location: amsterdam

how do i debug an FFGL?

Post by shimla » Sat Apr 27, 2019 14:46

i'm kinda new to writing FFGL plugins and xcode / visual studio so bare with me.
when writing stuff in juce i can run the app in debug mode in my IDE which makes debugging very easy. But i don't know how to debug an FFGL that way.
In order to debug my current plugin i've created a 'console' project version where i kinda debug my classes because i can cout them. but that's a bit redundant as i constantly have to switch projects just to debug them in a console.
so yea, what's a good method of debugging your FFGL project

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5180
Joined: Fri May 22, 2009 11:38

Re: how do i debug an FFGL?

Post by Joris » Sun Apr 28, 2019 10:51

In VS, you can choose Debug > Attach to Process and pick Resolume from the list.

Then all your breakpoints will hit when you use the plugin in Resolume.

Xcode has a similar function, but I don’t know what it’s called or what menu it’s in from the top of my head.

Jichak
Met Resolume in a bar the other day
Posts: 1
Joined: Sat May 11, 2019 06:39
Location: https://diceus.com/are-ukrainian-developers-good/

Re: how do i debug an FFGL?

Post by Jichak » Sat May 11, 2019 08:49

Joris wrote:
Sun Apr 28, 2019 10:51
In VS, you can choose Debug > Attach to Process and pick Resolume from the list.

Then all your breakpoints will hit when you use the plugin in Resolume.

Xcode has a similar function, but I don’t know what it’s called or what menu it’s in from the top of my head.
Thanks for this answer.

Menno
Team Resolume
Posts: 89
Joined: Tue Mar 12, 2013 13:56

Re: how do i debug an FFGL?

Post by Menno » Tue May 14, 2019 11:49

alternatively: in visual studio you can edit your plugin's property pages to launch arena.

right click the project > properties > Debugging
fill in the command to target the arena executable
fill in the working directory to be arena's executable directory

this way you can f5 your plugin project and it'll launch arena and attach to it automatically

You can also append the path to the composition file you want to open after the Command and then when launching your plugin project it'll make arena automatically open that composition.

User avatar
subpixel
Hasn't felt like this about software in a long time
Posts: 134
Joined: Thu Jun 05, 2014 09:32
Location: Melbourne, AU

Re: how do i debug an FFGL?

Post by subpixel » Sat Jul 13, 2019 13:53

Great tip, Menno! I thought there should be some way to do this, but didn't read whatever fine manual exists for Visual Studio.

I have addressed this problem by sourcing some code from the interwebs that launches the debugger from within the plugin.

Next question: how can we get Resolume to start without the splash screen? Trying to debug with that taking over my screen is somewhat annoying!

subpixel

Menno
Team Resolume
Posts: 89
Joined: Tue Mar 12, 2013 13:56

Re: how do i debug an FFGL?

Post by Menno » Tue Jul 16, 2019 10:06

You cannot start without splash screen. The splash screen should go away when you click though. Maybe simulate a mouse click yourself?

Code: Select all

enum MouseKey
{
	MK_LEFT,
	MK_RIGHT,

	MK_NumKeys
};
enum KeyDirection
{
	KD_PRESS,
	KD_RELEASE,
};

void InputDispatch::SendKey( MouseKey key, KeyDirection direction )
{
	INPUT inputEvent;
	inputEvent.type = INPUT_MOUSE;
	inputEvent.mi.dx = 0;
	inputEvent.mi.dy = 0;
	inputEvent.mi.mouseData = 0;
	switch( key )
	{
	case MK_LEFT:
		inputEvent.mi.dwFlags = direction == KD_PRESS ? MOUSEEVENTF_LEFTDOWN : MOUSEEVENTF_LEFTUP;
		break;
	case MK_RIGHT:
		inputEvent.mi.dwFlags = direction == KD_PRESS ? MOUSEEVENTF_RIGHTDOWN : MOUSEEVENTF_RIGHTUP;
		break;
	}
	inputEvent.mi.time = 0;
	inputEvent.mi.dwExtraInfo = GetMessageExtraInfo();
	SendInput( 1, &inputEvent, sizeof( INPUT ) );
}
void InputDispatch::SendKeyClick( MouseKey key )
{
	SendKey( key, KD_PRESS );
	SendKey( key, KD_RELEASE );
}

Menno
Team Resolume
Posts: 89
Joined: Tue Mar 12, 2013 13:56

Re: how do i debug an FFGL?

Post by Menno » Fri Aug 23, 2019 14:50

We've made a change in v7.0.2 to enable plugin developers to prevent arena from showing of the splash screen. If you provide --nosplash as command line argument resolume will not show it o7

User avatar
AngeloDV
Is taking Resolume on a second date
Posts: 31
Joined: Sat Oct 22, 2016 08:19
Location: The Netherlands

Re: how do i debug an FFGL?

Post by AngeloDV » Fri Aug 23, 2019 23:46

Great, thanks!
Image

User avatar
subpixel
Hasn't felt like this about software in a long time
Posts: 134
Joined: Thu Jun 05, 2014 09:32
Location: Melbourne, AU

Re: how do i debug an FFGL?

Post by subpixel » Sun Sep 01, 2019 11:08

Where do the printf()'s go to? I think Ronan suggested to the Output window (in Visual Studio), however it doesn't seem to show any plugin printf()s, eg for shader compilation errors.

joe5280
Met Resolume in a bar the other day
Posts: 1
Joined: Sun Sep 01, 2019 15:30

Re: how do i debug an FFGL?

Post by joe5280 » Sun Sep 01, 2019 15:33

I've just run into the same issue today.Got it running inside the debugger but I can't see the output of cout or printf.

Post Reply