-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
111 lines (76 loc) · 6.93 KB
/
atom.xml
File metadata and controls
111 lines (76 loc) · 6.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[blog.byteb.us]]></title>
<link href="http://blog.byteb.us/atom.xml" rel="self"/>
<link href="http://blog.byteb.us/"/>
<updated>2013-05-17T13:15:20+02:00</updated>
<id>http://blog.byteb.us/</id>
<author>
<name><![CDATA[Marc Löhe]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Debugging Typo3 4.7 with Xdebug in PHPStorm]]></title>
<link href="http://blog.byteb.us/blog/2013/05/15/debugging-typo3-4-7-with-xdebug-in-phpstorm/"/>
<updated>2013-05-15T23:17:00+02:00</updated>
<id>http://blog.byteb.us/blog/2013/05/15/debugging-typo3-4-7-with-xdebug-in-phpstorm</id>
<content type="html"><![CDATA[<p>Since I’m currently working an Extbase-Extension for TYPO3 4.7, I had to debug some backend code. I didn’t find anything on how to set this up with <a href="http://xdebug.org/">Xdebug</a> and <a href="http://www.jetbrains.com/phpstorm/">PHPStorm</a>, so I’ll write it down here.</p>
<!-- more -->
<h2>Requirements</h2>
<p>XDebug has to be installed and configured to work with PHPStorm, which works out fine with the <a href="https://www.jetbrains.com/phpstorm/webhelp/configuring-xdebug.html">official docs</a>. I assume that Xdebug and PHPStorm are tested and working.</p>
<h2>Symlinks</h2>
<p>Typo3 4.7 can be installed as usual, but you want to physically put the <code>typo3_src</code> folder into your webroot instead of just symlinking to it. This caused quite some headache while setting it up.</p>
<p>The webroot folder should look like this regarding symlinks:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>webroot/
</span><span class='line'> typo3_src/
</span><span class='line'> t3lib > typo3_src/t3lib/
</span><span class='line'> typo3 > typo3_src/typo3/
</span><span class='line'> index.php > typo3_src/index.php</span></code></pre></td></tr></table></div></figure>
<h2>PHPStorm setup</h2>
<h3>Directories</h3>
<p>When setting up the PHPStorm project you should choose your webroot folder as the <em>Content root</em> of your project. It would have been even better to select your plugin folder as <em>Content root</em> and only include the core sources, but there was no obvious way to get it done.</p>
<p>You can check this by opening the project settings in the Menu <em>Directories</em>.</p>
<h3>Path mappings</h3>
<p>In the symlink setup above, the folders <code>t3lib</code> and <code>typo3</code> as well as the <code>ìndex.php</code> were symlinked inside the <code>typo3_src</code> folder. We don’t have to make a physical copy of them that way, but we have to tell PHPStorm about it.</p>
<p>You can do this in the project settings, look for the submenu <em>Servers</em> inside <em>PHP</em>. You will have to setup a server now if you haven’t already. Activate the “Use path mappings” option. For each path in your project, you can now specify it’s absolute path by filling the column in the mappings table. Specify the absolute path inside <code>typo3_src</code> for the two symlinked directories and the symlinked <code>index.php</code>.</p>
<p>Set up theses mappings:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>------------------------------------------------------
</span><span class='line'>Project path > Absolute path on the server
</span><span class='line'>------------------------------------------------------
</span><span class='line'>/path/to/webroot > /path/to/webroot
</span><span class='line'> t3lib > /path/to/webroot/typo3_src/t3lib
</span><span class='line'> typo3 > /path/to/webroot/typo3_src/typo
</span><span class='line'> index.php > /path/to/webroot/typo3_src/index.php</span></code></pre></td></tr></table></div></figure>
<p>Notice that the path for the webroot was mapped to it’s own path. While testing this seemed to be necessary.</p>
<h3>One more mapping</h3>
<p>Also check the URL mapping by navigating to <em>Deployment</em> in your project settings. You will have to create a deployment server configuration if you haven’t already. Make sure, that you have a mapping for your webroot by entering your webroot’s path into the <code>Local path</code> field and <code>/</code> into the <code>Web path on server: xyz</code> field.</p>
<h2>That’s it!</h2>
<p>The setup isn’t too complicated, but there are enough possibilities to make something wrong, which I apparently did in almost all cases.</p>
<p>You can use <a href="http://www.jetbrains.com/phpstorm/marklets/">bookmarklets</a> and breakpoints to quickly debug your code on the fly. If you are not sure where to start, look for the <code>webroot/index.php</code> for the frontend and <code>webroot/typo3/index.php</code> to get you started. Also have a look at the <em>Network</em> tab of your devtools: a lot of requests are initiated on other endpoints like <code>webroot/typo3/alt_doc.php</code> or <code>webroot/typo3/mod.php</code> and a lot of others.</p>
<p>Also stay aware of the fact that the TYPO3 backend is made up of nested iFrames (which is slightly awkward…). If you want to reinitiate a request, it is probably better to right click into the concerned area and choose <em>Reload frame</em> than reloading the whole page which leaves you with the dashboard.</p>
<p>After writing down all of this I have to add one more thing: debugging software really is the most effective way to effectively learn, what it does. So yes, it is worth all the hassle of setting it up.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Hello...]]></title>
<link href="http://blog.byteb.us/blog/2013/05/15/hello/"/>
<updated>2013-05-15T21:53:00+02:00</updated>
<id>http://blog.byteb.us/blog/2013/05/15/hello</id>
<content type="html"><![CDATA[<p>Hello there. I just recognized, that I need some kind of blog to not forget things I do/like/don’t like. Most of these things have something to do with web development since that’s what I do.</p>
<p>I always wanted to work with <a href="https://github.com/mojombo/jekyll">Jekyll</a> and <a href="http://octopress.org/">Octopress</a> made me use it in minutes until now. So, let’s see, where this is going.</p>
<p>Marc</p>
]]></content>
</entry>
</feed>