No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
=== The | === The Different Scenarios for Debugging Turnkey Generic Code === | ||
# You have the MDrivenServer stable and you want to step through Turnkey-generic code | # You have the MDrivenServer stable and you want to step through Turnkey-generic code | ||
# Debug CodeDress code from the model '''''or''''' you have the MDrivenServer stable and you want to step through Turnkey-generic code | # Debug CodeDress code from the model '''''or''''' you have the MDrivenServer stable and you want to step through Turnkey-generic code | ||
# You want to debug | # You want to debug toward local prototyping XML-based persistence, cutting MDrivenServer out of the equation | ||
A walk-through article complementing this | A walk-through article complementing this Wiki post is available here: https://blog.mdriven.net/debug-codedress-turnkey-locally/ | ||
=== Starting Turnkey | === Starting Turnkey Locally === | ||
Please look [[Development in Visual Studio|here]] for | Please look [[Development in Visual Studio|here]] for instructions on downloading, unpacking, and opening Turnkey as a Web site in Visual Studio. | ||
=== Debugging === | === Debugging === | ||
==== 1: MDrivenServer stable and you want to step through Turnkey-generic code ==== | ==== 1: MDrivenServer is stable and you want to step through Turnkey-generic code ==== | ||
Use MDrivenServerOverride.xml with setting: | Use MDrivenServerOverride.xml with the setting: | ||
<MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a">https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride> | <MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a">https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride> | ||
==== 2: Debug CodeDress code from the model '''''or''''' you have the MDrivenServer stable and you want to step through Turnkey-generic code ==== | ==== 2: Debug CodeDress code from the model '''''or''''' you have the MDrivenServer stable and you want to step through Turnkey-generic code ==== | ||
Make sure you have the same model version in the MDrivenServer as you have locally in Visual Studio. Use MDrivenServerOverride.xml with setting: | Make sure you have the same model version in the MDrivenServer as you have locally in Visual Studio. Use MDrivenServerOverride.xml with the setting: | ||
<MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a" '''CodeDressOverride'''="C:\PathToCodeDress_bin_Debug_assemblies" >https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride> | <MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a" '''CodeDressOverride'''="C:\PathToCodeDress_bin_Debug_assemblies" >https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride> | ||
==== 3: You want to debug | ==== 3: You want to debug toward local prototyping XML-based persistence, cutting MDrivenServer out of the equation ==== | ||
Note that for this option CodeDress will always try to find assemblies close to the model rather than in ModelCodeAssemblies. The tried paths for assemblies are "bin/debug" and "../bin/debug" (relative to model path): .Use MDrivenServerOverride.xml with setting: | Note that for this option CodeDress will always try to find assemblies close to the model rather than in ModelCodeAssemblies. The tried paths for assemblies are "bin/debug" and "../bin/debug" (relative to model path): .Use MDrivenServerOverride.xml with setting: | ||
<MDrivenServerOverride '''PrototypeWithMDrivenDesignerInPath'''="C:\PathToLocalModel modlr or ecomdl"></MDrivenServerOverride> | <MDrivenServerOverride '''PrototypeWithMDrivenDesignerInPath'''="C:\PathToLocalModel modlr or ecomdl"></MDrivenServerOverride> |
Revision as of 07:01, 17 February 2023
The Different Scenarios for Debugging Turnkey Generic Code
- You have the MDrivenServer stable and you want to step through Turnkey-generic code
- Debug CodeDress code from the model or you have the MDrivenServer stable and you want to step through Turnkey-generic code
- You want to debug toward local prototyping XML-based persistence, cutting MDrivenServer out of the equation
A walk-through article complementing this Wiki post is available here: https://blog.mdriven.net/debug-codedress-turnkey-locally/
Starting Turnkey Locally
Please look here for instructions on downloading, unpacking, and opening Turnkey as a Web site in Visual Studio.
Debugging
1: MDrivenServer is stable and you want to step through Turnkey-generic code
Use MDrivenServerOverride.xml with the setting:
<MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a">https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride>
2: Debug CodeDress code from the model or you have the MDrivenServer stable and you want to step through Turnkey-generic code
Make sure you have the same model version in the MDrivenServer as you have locally in Visual Studio. Use MDrivenServerOverride.xml with the setting:
<MDrivenServerOverride MDrivenServerPWD="pwd for mdrivenserver user a" CodeDressOverride="C:\PathToCodeDress_bin_Debug_assemblies" >https://<urltomdrivenserver usually ending with __MDrivenServer></MDrivenServerOverride>
3: You want to debug toward local prototyping XML-based persistence, cutting MDrivenServer out of the equation
Note that for this option CodeDress will always try to find assemblies close to the model rather than in ModelCodeAssemblies. The tried paths for assemblies are "bin/debug" and "../bin/debug" (relative to model path): .Use MDrivenServerOverride.xml with setting:
<MDrivenServerOverride PrototypeWithMDrivenDesignerInPath="C:\PathToLocalModel modlr or ecomdl"></MDrivenServerOverride>
All steps require Turnkey generic code access to work fully - but can be used partially by opening turnkey local installations in visual studio as web site.
If you want to see status of a running Turnkey app look here: Serverinfo
Problem solving
If you run into problems, this is some situations and how to correct them;
- Make sure you have the same installed version of TK and the installed Framework in VS. If you uninstall the Framework, try Clean GAC to be sure you don't have old versions getting loaded.
- Exception in VS with No suitable constructor found
- Old versions in the GAC gets loaded from your CodeDress. Uninstall framework and then Clean GAC
Other tips and tricks
There are many chrome plugins to intercept where files are loaded from -> great when you want you app to grab stuff from your development folder to avoid reloading the css all the time.
There are chrome plugins for intercepting redirects -> great when you have a openid provider set up for production but need to debug locally - then catch the openid redirect back to your localhost
.net Framework vs .net Core
The Binaries for .net Core and .net Framework are different and codedress from a Core-built-server with Framework built model will not work. Create a new ModelProject in VS that targets .net Core - and build the model with that to get CodeDress to load.