<p>When I am stuck with a problem:</p>

<ul>
<li>I search Google for code snippets.</li>
<li>I look at isolating the problem, so that I can better explain it to others in order to get answers.</li>
</ul>

<p>What search techniques do you use to find the solution to your problem?</p>

<p>I started asking questions in Stack Overflow.</p>

<p>What other techniques or methods do you follow, to fix the problem more quickly?</p>

Well there's:
Google
Google
Google
Stack Overflow
Google
Google
Maybe a book if I have one.
Seriously, I started (hobby) programming in the 1980s and even into the mid 90s you had to know things and have a technical library.  Then Google came along and it's easier to Google something than it is to look up (bookmarked!) API documentation (Google "java stringbuilder" will get me there faster than navigating will) let alone an actual book (electronic or paper).
Most problems you're trying to solve have been solved before.  Many times.
The rest of debugging comes down to decomposition, possibly unit testing (which is related to decomposition) and verifying your assumptions.
By "decomposition", I mean that your solution is structured in such a way that small pieces can be individually tested and readily understood.  If you have a 7000 line method you're (probably) doing something wrong.
Understanding what assumptions you've made is key too so you can verify them.  For example, when I started with PHP I wrote a piece of code like this:
```
```
$fields = $_SESSION["fields"]; // $fields is an associative array
$fields["blah"] = "foo";
```
```
and I was scratching my head trying to figure out why it didn't work (the array wasn't being updated next time I queried $_SESSION).  I came from a Java background where you might do this:
```
```
Map fields = (Map)httpSession.get("fields");
fields.put("blah", "foo");
```
```
and that would most definitely work.  PHP however
copies
the array.  A working solution is to use references:
```
```
$fields =& $_SESSION["fields"]; // $fields is an associative array
$fields["blah"] = "foo";
```
```
or simply:
```
```
$_SESSION["fields"]["blah"] = "foo";
```
```
The last thing I'll say about debugging and writing robust code in general is to understand the boundaries of your solution.  By this I mean if you're implementing a linked list then the boundary conditions will revolve around when the list is empty.