Debugging - Cockatrice/Cockatrice GitHub Wiki

If you're trying to debug Cockatrice, but need to know how to properly log the results, follow the steps below for your proper OS:


Windows

Configuring Visual Studio to allow debugging inside the IDE (GUI)

  1. Follow the Compiling Protobuf instructions

    Replace all instances of the word Release with Debug in the various commands.

  2. Follow the Compiling Cockatrice instructions

    Replace all instances of the word Release with Debug in the various commands.

  3. Start Visual Studio and open the Cockatrice.sln project located under C:\Cockatrice\build

  4. Choose "Debug" in the Solutions Configurations drop down along the top toolbar.

  5. Right click and choose build for the following projects in the solutions explorer along the right:

    INSTALL

  6. Copy all the d.dll files of the folder "C:\Cockatrice\build\Release" to each of the following folders:

    "C:\Cockatrice\build\cockatrice\Debug", "C:\Cockatrice\build\oracle\Debug", "C:\Cockatrice\build\servatrice\Debug"

You should now be able to execute either the cockatrice application, oracle application, or servatrice application from with in the Visual Studio IDE (GUI) by right clicking on the appropriate solutions explorer project, highlight the debug right click menu option and select the start new instance sub menu item.

Note: If you ever remove the "Debug" sub directories under the build folder paths mentioned above in step 6 you will need to recopy the files to the appropriate locations in order for things to operate properly again.

Note: You should now also be able to see debug output inside the Visual Studio output window during the execution of the application.

OS X

Assuming Cockatrice is installed as /Applications/Cockatrice.app

  • Open Terminal.app
  • Run /Applications/cockatrice.app/Contents/MacOS/cockatrice &> ~/Desktop/Cockatrice.log &
  • Cockatrice will record all logs to Cockatrice.log in your Desktop folder.

Linux

Run cockatrice from the command line and the logs will be generated to stdout; you can redirect them to a file to upload to the bug tracker if you have problems.