Two ways to debug a VxWorks code include as a function that is started in suspended debug mode or as a task that is attached to and suspended for debug.
Launching a function
in debug mode
Start by setting up a project for debug using SIMNTgnu toolchain and simulator BSP

Now make sure symbol analysis is don on new project

Adding example code files to your new project

Now build it

Now debug it

Connect to custom simulator

Now set up entry point for debug to stop on

Now run in debug mode

Now single step and debug your code and note that in simulator windshell your task that is being debugged is in as suspended (STOP) state

Attaching to an
already running task and suspending for debug
Alternatively, if you have a resident service that is running as a periodic task, you can attach to it, suspend it and then debug it

You will most often wind up in kernel code, so step out of the system call and back into application code
