Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:debugging [22.09.2017 17:09] johannes.lotzen:create:debugging [22.09.2017 17:33] johannes.lotz
Line 107: Line 107:
 {{:de:create:scr.debug.info03source.png?nolink|Eine Fragebogenseite, die u.U. leer bleibt}} {{:de:create:scr.debug.info03source.png?nolink|Eine Fragebogenseite, die u.U. leer bleibt}}
  
-In der [[#debug-information|Debug-Information]] ist nicht nur ersichtlich, dass und weshalb die Frage "AB05" nicht angezeigt wird, sondern auch dass es automatisch mit der nächsten Seite Nr. weitergeht.+In the [[#debug-information|Debug-Information]] not only can one observe why item "AB05" is not shown but also that it will automatically continue with page 4.
  
 {{ :de:create:scr.debug.info03.png?nolink |beispiel}} {{ :de:create:scr.debug.info03.png?nolink |beispiel}}
  
-Darüber hinaus ist links oben an der Seitennummer "3+4" erkennbardass die Seiten 3 und 4 gemeinsam angezeigt werdenDiese Anzeige erhält man auch, wenn man ''[[:de:create:functions:gotopage]]'' verwendetDieser Befehl springt aus einer Fragebogenseite hinaus direkt zu einer anderen.+Furthermore, on the top left you can find the page numbers "3+4", which means that these pages will be shown at onceThis display also results if you use ''[[:de:create:functions:gotopage]]''this command takes you directly from one page of the questionnaire to another.
  
  
-==== Beispiel ====+==== Example ====
  
-Folgender PHP-Code sollte ab einem Summenwert von 25 zu einer anderen Fragebogen-Seite springen und dort (über den weiteren Frageneinen Text anzeigen -- aber vom Text ist nichts zu sehen:+The following PHP code shall if the value of the sum is 25 jump directly to another page of the survey and there (above other questionsshow a specific text information -- but the text cannot be found:
  
 <code php> <code php>
Line 125: Line 125:
 </code> </code>
  
-Hier helfen nun die Informationen, welche der Debugging-Modus liefert ([[#debug-information|Debug-Information]]). Diese zeigen, dass der Befehl ''[[:de:create:functions:text]]'' gar nicht ausgeführt wirddas ''goToPage()'' aber schonAm Filter kann es also nicht liegen, dieser funktioniert.+Here only the output of the debugging mode will help ([[#debug-information|Debug-Information]]). This shows that the command ''[[:de:create:functions:text]]'' is not being executedthe ''goToPage()'' however isThus it is not the filter that produces the problem.
  
-Ein Blick in die Anleitung des Befehls ''[[:de:create:functions:gotopage]]'' verrät daraufhin, dass dieser direkt zur angegeben Seite springt und dann nichts mehr von der aktuellen Seite ausgeführt wirdin diesem Beispiel also auch nicht das ''text()''Kennt man die Ursacheist die Lösung einfachDas ''text()'' muss vior das ''goTopage()''.+Take a look a the initial of the command:''[[:de:create:functions:gotopage]]''. It tells us that it will make you jump to the specific page directly without executing anything else on the page of origin. In this examplenot even ''text()''If you are aware of the causethe solution is simpleMove ''text()'' in front of ''goTopage()''.
  
 <code php> <code php>
Line 137: Line 137:
  
  
-===== Fehlersuche in JavaScript =====+===== Finding Bugs in Java =====
  
-Während PHP-Code von SoSci Survey auf dem Befragungsserver ausgeführt wirdläuft [[de:create:javascript|JavaScript]] im Browser beim TeilnehmerEntsprechend ist der Browser auch dafür verantwortlich, Fehler und Informationen anzuzeigen.+While the PHP code of SoSci Survey is being executed on the server, [[de:create:javascript|JavaScript]] will run in the browser of the participantAccordingly the browser is responsible for finding errors and information.
  
-Dafür wird die Fehlerkonsole des Browsers benötigtDiese findet man -- je nach Browser -- an unterschiedlicher Stelle ([[http://webmasters.stackexchange.com/a/77337/30902|Shortcuts (engl.)]], [[https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Step_3:_Diagnosis|Wordpress (engl.)]], [[http://www.stramaxon.com/2013/10/developer-tools-in-browser.html|How to Open Developer Tools (engl.)]]).+To do so, the error log is neededOne can find it -- depending on the browser -- at different places. 
 +([[http://webmasters.stackexchange.com/a/77337/30902|Shortcuts (engl.)]], [[https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Step_3:_Diagnosis|Wordpress (engl.)]], [[http://www.stramaxon.com/2013/10/developer-tools-in-browser.html|How to Open Developer Tools (engl.)]]).
  
-Verwenden Sie den Befehl ''console.log()'', um zusätzliche Informationen in der Fehlerkonsole anzuzeigenSo würde der folgende JavaScript-Code z.Bnach einem Element mit der HTML-ID "AB01_01" suchen -- und in der Fehlerkonsole anzeigen, was er gefunden hat.+Use the command ''console.log()'' to find additional information in the error logAccordingly, the following Java script code would, e.g., look for an element with the HTML-ID "AB01_01" -- and display the same in the error log if it finds it
  
 <code html> <code html>
Line 154: Line 155:
 </code> </code>
  
-Aktuelle Browser haben zusätzlich einen "Inspektoroder "DOM Explorer" o.ä., welcher es erlaubteinfach auf ein Objekt der Fragebogenseite zu klicken (z.Bauf ein Eingabefeld)um zusätzliche Informationen (z.B. den HTML_Code inkl. HTML-ID) zum Objekt anzeigen zu lassen.+Browsers nowadays additionally offer an "inspectoror "DOM Explorer" or the likeThis allows for clicking on an item on a given page of the survey (a text boxfor example)to find further information (e.g., the HTML_Code inclthe HTML-ID) of said item.
en/create/debugging.txt · Last modified: 04.09.2023 21:31 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki