Golden Words

Dalam hidup, ada beberapa orang yg tak akan pernah mampu berhenti mencintai seseorang. Tak peduli betapa keras mereka mencobanya,Bahagia bukan berarti memiliki semua yang kita cintai. Bahagia itu mencintai semua yang kita miliki.

Golden Words

Hanya karena cara Tuhan tak dapat dimengerti, bukan berarti cara Tuhan salah dan caramu sendiri benar,Hidup ini kamu yg jalani, lakukan apapun yg ingin kamu lakukan, tapi pastikan itu sebuah cerita yg kelak pantas tuk diceritakan.

Golden Words

Hidup terlalu singkat tuk mencemaskan hal kecil. Nikmati apa yg kamu miliki hari ini, bukan apa yg mungkin kamu miliki esok hari,Jangan berubah hanya karena ada yg tak menyukaimu. Jadi dirimu sendiri, akan selalu ada seseorang yg menyayangimu apa adanya.

Golden Words

Jangan tangisi sebuah perpisahan. Suatu hari kamu akan berterimakasih, karena hal itu telah menjadikanmu pribadi yg lebih baik,Terkadang, seseorang sulit tuk jatuh cinta, karena ketika dia telah memberikan seluruh hatinya, dia tak dapatkan kembali seutuhnya.

Golden Words

Semua pengetahuan yang saya miliki, orang lainpun dapat memilikinya, tapi, hati saya hanyalah milik saya,Niata adalah ukuran dalam menilai benarnya suatu perbuatan, oleh karenanya, ketika niatnya benar, maka perbuatan itu benar, dan jika niatnya buruk, maka perbuatan itu buruk.


penyebab komputer sering mati

0 komentar

Komputer tiba-tiba mati sendiri / restart sendiri, adalah satu dari beribu masalah yang ada dalam Dunia per-komputer-an. To the Point
mengapa komputer bisa mati sendiri tanpa sebab atau pemberitahuan secara system :

  1. Adanya Virus yang menginfeksi salah satu program aplikasi dan virus tersebut dirancang untuk mematikan sistem komputer, contoh : Virus yang berekstensi mematikan sistem komputer sedang menginfeksi program winamp, efeknya, setiap anda menjalankan winamp komputer akan mati atau restart dengan sendirinya.
  2. Kerusakan salah satu atau beberapa sistem sistem operasi, Contoh : pada kasus ketika kita menjalankan komputer terasa lambat, belum lama kita meratapi kelambatan sistem komputer, tiba-tiba komuputer mati tanpa sebab
  3. Kesalahan / kurang tepat dalam pemasangan Hardware, sering juga masalah matinya komputer secara mendadak di karenakan adanya hardware yang mengalami gagal Fungsi, contoh : pada saat menjalankan komputer, terdengan suara bising yang teramat sangat, atau adanya pemaksaan kapasitass RAM untuk menjalankan banyak program sehingga ada limit kapasitas memory.
  4. Suhu udara didalam dan diluar Cashing PC
Solusi menurut pengalaman yang di alami oleh Penulis:
  1. untuk masalah yang di sebabkan oleh point 1, jalankan komputer dan jangan menjalankan program yang membuat komputer anda mati secara tiba-tiba, jika masalah itu tidak timbul pikirkan dua kemungkinan. Pertama : program tersebut terinfeksi Virus yang berpotensi mematikan sistem komputer, bersihkan dengan anti Virus terbaru ( dan UPTODATE ) atau silahkan kembangkan Tips menghilangkan Virus disini, jika ternyata tidak ada Virus yang terdeteksi, berarti Kedua : Ada Program / program tersebut crash dengan sistem operasi ( namun sangat tipis kemungkinan sistem komputer mati karena adanya Crash program, kebanyakan berakibat Komputer Hang )
  2. Untuk point Kedua dari penyebab komputer mati mendadak, Repair sistem operasi harus dilakukan, untuk memastikan silahkan anda masuk program BIOS dan Berlama-lamalah didalam program BIOS tersebut, jika komputer tidak mati saat anda berlama-lama di dalam BIOS, sudah bisa di pastikan bahwa sistem operasi yang memiliki masalah, lakukan Repair, namun jika masalah ( matinyanya komputer secara tiba-tiba ) itu muncul saat anda didalam Program BIOS,maka perhatikan Solusi Ke Tiga
  3. Dalam Menganalisa Hardware mana yang menjadi penyebab masalah, akan sedikit Ribet, Pertama : silahkan anda Bongkar semua rangkaian Komputer anda dan pasang kembali dengan benar ( rakit ulang komputer anda ), jika masalah tidak terselesaikan, anda harus mencoba satu persatu dengan menggunakan sistem rangkaian PC lain, silahkan coba Satu Persatu Perangkat Hardware anda pada PC lain. jika tidak menemukan kesalahan / satupun kerusakan pada Hardware anda, perhatikan Point Ke empat
  4. Rasakan suhu yang ada dalam ruangan tempat anda meletakkan komputer, buatlah agar suhu tidak terlalu panas, Mengapa ? Kondisi suhu yang panas baik di dalam maupun di luar Cashing PC, akan membuat kinerja komponen Hardware komputer menurun, saat sampai pada puncak ketahanan Suhu, komputer akan mati dengan sendirinya, Point ini sering terjadi pada kumpulan komputer yang menyala bersama-sama dalam satu ruangan seperti Kantor atau Lab Komputer
Langkah ini bisa anda Coba saat anda mendapati masalah yang seperti pada kasus yang kita bahas kali ini, penulis mengharapkan komentar yang dapatmemberi tambahan referensi untuk Tips ini, semoga Bermanfaat

sumber : http://komp-rakitan.blogspot.com/2012/04/mengapa-komputer-restart-mati-sendiri.html

mempercepat koneksi smart fren

1 komentar

Kali ini saya akan berbagi sedikit tips untuk meningkatkan kecepatan koneksi internet Smartfren anda yang lelet atau lemot. Dalam artikel-artikel sebelumnya telah saya singgung sedikit tentang masalah pelayanan Smartfren yang saat ini sedang populer dibahas. Keluhan-keluhan banyak berdatangan dari para pelanggan Smartfren yang merasa kecewa atas kualitas internet Smartfren. Apa sih yang kebanyakan mereka keluhkan? Pastinya kebanyakan dari mereka mengeluh akan kecepatan internet Smartfren yang makin lama makin menurun. Makin lama makin lemot saja internet menggunakan Smartfren.
Lemot atau lelet di sini sebenarnya relatif sih ya. Ada yang mendapatkan kecepatan internet misal 20 KB/s itu dianggap lelet. Ada yang menganggap kecepatan 100 KB/s itu juga masih lelet. Mungkin bagi pengguna baru Smartfren yang dulunya masih setia dengan provider GSM, mendapatkan kecepatan download sampai 100 KB/s itu dianggap tinggi dan tidak lemot. Tapi tidak jika anda adalah pengguna lama Smartfren, yang dulunya sering mendapatkan kecepatan download di atas 200 KB/s. Dengan menurunnya kecepatan download sampai 100 KB/s mungkin anda langsung protes ke pihak Smartfren. Jadi sebenarnya lemot atau tidaknya kecepatan internet tergantung penilaian masing-masing.
Share sedikit nih, saya pernah berkunjung ke blog yang lagi membahas tentang internet menggunakan provider AHA, karena saya juga sedang mencari referensi provider internet CDMA yang bagus, termasuk ingin mencari review provider AHA yang KATANYA lebih baik daripada Smartfren dan ketemulah di blog itu. Tidak usah saya sebutin blognya ya, anda bisa mencari di Google, banyak kok yang membahas seputar provider AHA. Setelah saya membaca review yang tertulis di blog tersebut kemudian saya membaca komen-komen yang bisa tergolong banyak lah yang komen di blog itu. Dan apa isi dari komen mereka? Ya tidak jauh dari keluhan para pelanggan Smartfren lah, yang mengeluh kenapa semakin lama internet menggunakan AHA semakin lemot. Tidak cuma 1 atau 2 orang saja yang komen atas keluhannya, tapi hampir semua komen. Dari sini bisa saya ambil kesimpulan bahwa kualitas internet dari provider di Indonesia memang masih rendah, tidak hanya Smartfren tapi semua. Ya mau gimana lagi, bisanya provider kita memang segitu, pengen kualitas yang lebih baik? Bayar lebih mahal.
Oke, kita kembali ke topik tentang tips menambah kecepatan koneksi internet Smartfren. Sebenarnya tips ini bukan hanya untuk Smartfren sih, tapi bisa dikategorikan secara umum (all operator) karena tips ini hanya merubah seting DNS internet anda. Jika anda saat ini sedang kesal dengan koneksi internet Smartfren yang makin lama makin lelet. Tidak ada salahnya anda mencoba tips ini. Dan jujur saja, sebenarnya tips ini belum pernah saya coba, karena Alhamdulillah sampai saat ini saya belum menjumpai koneksi internet yang lemot selama menggunakan Smartfren seperti yang sudah saya jelaskan pada artikel-artikel sebelumnya. Dan kalau pun nantinya saya mengalami masalah koneksi menggunakan Smartfren saya lebih baik menggunakan provider lain, maksudnya saya telah menyediakan beberapa kartu cadangan untuk internet. Daripada harus mengeluh yang belum tentu masalah saya terselesaikan saat itu juga. Waktu adalah uang. Dan uang yang saya dapatkan datangnya dari internet, internet macet uang pun macet, hehehe.
Tips ini saya dapatkan di forum Facebook yang sedang membahas masalah internet menggunakan Smartfren, tapi forum yang membagikan tips menambah kecepatan internet Smartfren malah sering dihapus oleh pihak Smartfren, aneh memang Smartfren, sudah tahu banyak pelanggannya yang mengeluh koneksi yang lambat, trus ada yang ingin membantu malah dihapus.
Pada tips ini intinya anda hanya perlu merubah seting DNS internet menggunakan suatu software yang bernama DNS Benchmark. Menurut orang-orang di forum sih tips ini berguna sekali, ya walaupun hanya sedikit setidaknya tips ini bisa menambah kecepatan internet anda. Untuk cara menggunakan DNS Benchmark adalah sebagai berikut.
1. Download software DNS Benchmark, software ini portable jadi tidak perlu instalasi
2. Buka program DNS Benchmark, pilih pada menu Nameservers

3. Klik pada Run Benchmark dan tunggu sampai proses pencarian DNS selesai. Mungkin ini akan memakan waktu lama jika koneksi anda lemot, jadi sabar saja
4. Jika proses pencarian selesai terlihat beberapa daftar DNS. DNS yang berwarna kecoklatan sudah tidak bisa dipakai sedangkan yang berwarna hitam masih bisa dipakai.

5. Cari DNS yang grafik biru sama hijau masih banyak atau panjang. Grafik berwarna merah menandakan bandwidth yang sudah terpakai.
6. Cari 2 DNS yang mempunyai kemiripan untuk primary dan secondary DNS. Misalnya DNS Google
Primary DNS: 8.8.8.8
Secondary DNS: 8.8.4.4

7. Untuk memasukkan DNS pada Smartfren, buat seting profil internet baru dengan pengaturan sebagai berikut:
Profile Name: Smart1
Access Number: #777
User name: smart
Password: smart

Untuk cara membuat profil internet baru bisa anda lihat pada artikel saya sebelumnya.
8. Klik Advanced untuk pengaturan lebih lanjut
9. Pada DNS Settings pilih Static kemudian isikan 2 DNS sebagai primary dan secondary DNS, klik OK

10. Kilk Save >> OK untuk menyimpan pengaturan profil baru

11. Pilih profil internet yang telah anda buat tadi, misal Smart1 kemudian klik Connect

12. Cobalah untuk browsing dan rasakan perubahannya. Apakah terasa lebih cepat? Jika belum atau tambah lemot anda bisa menggunakan DNS yang lain yang ada pada daftar DNS Benchmark. Ganti DNS Google (8.8.8.8 dan 8.8.4.4) dengan DNS yang lain.
Catatan:
Mungkin perubahan yang terjadi tidak begitu kelihatan karena ini hanya mengganti pengaturan DNS, semua kita kembalikan kepada ISP masing-masing. Tapi sebagian besar pengguna merasa tips ini banyak membantu khususnya bagi pengguna Smartfren yang internetnya sangat lemot. Yang jelas untuk mendapatkan kecepatan internet yang bagus anda harus mengetahui syarat-syaratnya.

sumber : http://teknikit.com/2011/10/tips-mempercepat-koneksi-internet-smartfren.html

Mempercepat Koneksi atau Akses Internet Smart d1200p

0 komentar

tadinya hampir kewalahn menggunakn modem smart yang bener2 lelet tapi sekarang ngumayan nich gara 2 ane ngikutin tips di bawah ini whhhh

selama menggunakan layanan Internet Smart HP Modem d1200p, sebenarnya saya sudah sering melakukan oprek-oprek bagaimana cara mempercepat koneksi atau akses internet smart d1200p yang terkenal cukup lambat ini. Beberapa cara yang saya lakukan dalam meningkatkan kecepatan koneksi atau akses internet smart d1200p adalah dengan melakukan perubahan-perubahan setting configuration pada windows dan setting connection pada smart. Perubahan-perubahan yang saya lakukan adalah :
Pertama dengan mengganti Configuration Setting pada Windows  seperti setting pada koneksi Internet pada umumnya yaitu dengan cara edit pada Register dari menu Run. Setelah itu ketik pgedit.msc  eh ma’af  salah maksud saya gpedit.msc. Selanjutnya tekan Enter pada Computer Configuration pilih Administrative Templates lalu pilih Network selanjutnya pilih Qos Packet Scheduler kemudian pilih Limit Reservable Bandwidth (klik dua kali) selanjutnya pada menu setting ubah dari Not Configured ke Enable… dan ubah Bandwidth dari 20% ke 0%… Langkah tersebut digunakan untuk meniadakan akses bandwidth oleh System Microsoft sehingga seluruh bandwidth diharapkan dapat digunakan untuk Akses Internet (Smart) dan dapat mempercepat koneksi atau akses internet smart d1200p.
Selanjutnya untuk mempercepat Koneksi Smart jangan gunakan driver bawaan dari CD HP Smart tetapi gunakan software driver Smart yang telah di Upgrade.
Extract dan Install driver tersebut di komputer Anda. Namun sebelumnya silahkan Anda Remove dulu driver yang lama dari komputer Anda.
Kedua adalah dengan melakukan perubahan-perubahan setting koneksi smart yaitu pada username, password dan dial-number. Dari sini ternyata ada yang unik….  pada akses internet smart kita dapat melakukan perubahan-perubahan pada variabel tersebut dan setiap perubahan ternyata sangat berpengaruh dalam meningkatkan kecepatan akses atau koneksi internet smart d1200p. Berikut ini saya tampilkan hasil dari speedtest untuk setiap perubahan yang saya lakukan pada variabel-variabel tersebut.
1. username : smart / password : smart / dial-number : #777 (Default)

2. username : smart / password : smart / dial-number : *31*11111#

3. username : cdma / password : cdma / dial-number : #777

4. username : cdma / password : cdma / dial-number : *31*11111#

5. username : wap / password : wap / dial-number : *31*11111#

6. username : telkom / password : telkom / dial-number : 080989999

Saat melakukan oprek-oprek mempercepat akses atau koneksi internet smart hp modem d1200p ternyata pada smart d1200p dapat digunakan dial-number Telkomnet Instant yaitu 080989999 dengan username telkom dan password telkom dan diperoleh kecepatan cukup tinggi yaitu 0,12 Mbps download dan 0,07 Mbps upload. Kecepatan ini sama dengan setting smart dengan dial-number *31*11111#.
Selain itu yang unik lagi adalah bahwa username, password dan dial-number tersebut dapat saling dikombinasikan antar setting. Selain nomor-nomor dial diatas masih ada lagi beberapa dial-number yaitu diantaranya *777#. Namun dari hasil speedtest ternyata tidak lebih cepat dari setting di atas.
Biasanya kecepatan tertinggi sering didapat pada pagi hari (menjelang subuh) sampai sekitar jam 07.00 pagi dan menjelang sore hari. Saat-saat seperti itu kecepatan sering menyentuh 0,14 Mbps untuk download dan 0,09 Mbps untuk upload.
Namun sayang kecepatan download sebesar itu ternyata hanya kecepatan Browsing Download dan tidak pernah tercapai saat kita melakukan Download File kecuali dengan bantuan IDM (Internet Download Manager). Mungkin itu salah satu kekurangan dari koneksi smart d1200p.
Nah Anda tertarik untuk mencobanya? Atau mungkin memiliki Trik dan Tip lain dalam meningkatkan kecepatan koneksi atau akses internet smart d1200p?  Silahkan sharing ke saya yach saya tunggu. Berikut ini Software Speedtest praktis yang dapat digunakan untuk mengetahui Bandwidth/Kecepatan Koneksi Internet. Dengan software ini Anda dapat memilih dengan Server mana Anda akan melakukan Test Koneksi.
Setelah Anda Setting seperti di atas untuk lebih mempercepat Proses Browsing dan Membuka Halaman WEB, dapat Anda gunakan Software WEB Accellerator diantaranya Slipstream. Untuk lengkapnya dapat Anda baca DI SINI.

sumber : http://oprekzone.com/mempercepat-koneksi-akses-internet-smart-d1200p/

Mengatasi masalah “This connection is Untrusted” di mozila firefox

1 komentar

Alhamdulilah stlah kami mencari-cari di Beberapa minggu bahkan bulan lalu kami sempat mengalami masalah ketika akan login ke facebook,mail yahoo,blog,wordpress dll. stiap masuk log pasti  muncul pesan page error ” This connection is Untrusted ” . Seharusnya kita langsung login, ketika muncul pesan ini tentu sangat menyebalkan. kami senang sekali karna kami menemukan di website aaheroe.info yang memposting  tentang masalah ini.
contoh pesan errornya :


solusi untuk pemecahan ini ada 2 sebenarnya :
solusi pertama (contoh pada gambar error di atas,)
1. klik I Understand the Risks
2. lalu klik tombol Add Exception
3. setelah di klik akan muncul window Add Security Exception
4.lalu klik Get Certificate
5. lalu setelah beberapa saat klik tombol Confirm Security Exception
selanjutnya page akan loading normal dan kamu sudah masuk ke halaman profile facebook kamu.
cara ini merupakan cara singkat dan tidak permanen, karena ketika anda login lagi maka harus mengulangi lagi step seperti di atas, capek kan ?
setelah saya selidiki kenapa sampai muncul pesan seperti ini , karena di pc lain dalam 1 jaringan lancar2 saja . Akhirnya saya sepertinya mengetahui penyebabnya, yaitu masalah tidak cocoknya waktu di komputer kamu dengan waktu lokal kamu . Saya menduga ini lah penyebab kenapa selalu keluar pesan This connection is Untrusted.
kasus ini tidak hanya ketika akan login di facebook, tetapi di website lain yang menggunakan https ketika akan login, seperti akan login ke yahoo, blogger atau website lainya.
jadi coba gunakan cara ke 2 untuk mengatasi masalah ini secara permanen .
- cocokan waktu di pc kamu dengan waktu lokal kamu, untuk hal itu kamu bisa ke control panel ==> trus pilih date and time .
akan tetapi untuk beberapa kasus kamu tidak bisa mensetting waktu dan keluar pesan “you don’t have privilege level change system time”
kalau sudah begini, coba cari start menu ==> run=== >trus ketik gpedit.msc
lalu coba ikuti langkah ini
Local Computer Policy | Computer Configuration | Windows Settings | Security
Settings | Local Policies | User Rights Assignment
lalu klik Change the System Time, untuk defaultnya hak akses untuk Power Users
dan Administrators. kalau kolom hak untuk pengaturan waktu kosong, tinggal add dengan klik add user/grup lalu klik advance lalu klik find now . pilih user administrator atau user yang anda sedang pakai sekarang.




lalu restart pc kamu dan kamu sudah bisa lagi mensetting waktu/jam di komputer kamu .

sumber : http://pprbm.wordpress.com/2010/12/14/mengatasi-masalah-%E2%80%9Cthis-connection-is-untrusted%E2%80%9D-di-mozila-firefox/

Debugging Xcode

1 komentar


With this theoretical knowledge in place, open BrokenCrunch and let’s get started. After loading our sample application, select Build > Build and Debug. You’ll notice that the application fails to launch, and the compiler has generated a number of errors. To view the results of the attempted compilation, select Build > Build Results.
Xcode Debugging Figure 1 - Build Results Listing
Selecting the errors listed will take you directly to the line of code where the error is being reported. One important thing to keep in mind, however, is that the number of errors being reported by the compiler and the line numbers of those errors should be thought of as the “best guess” of what’s wrong with your application, not a conclusive pronouncement.
In fact, one simple syntax error can result in multiple errors being reported by the compiler that are seemingly unrelated to the problem. As an example, take a look at the “Expected bracket before ‘setImage’” error line. If you examine the line in question, you should find that the syntax is perfect. As it turns out, the problem here isn’t on the line reported, but the line just above it. Do you see the problem?
The NSLog() statement wasn’t terminated with a semicolon. This means that the compiler doesn’t know that you intended to end the line after the last parenthesis, and is viewing everything from NSLog to the final closing bracket and semi-colon after UIControlStateNormal as one statement.
Add the semicolon to complete the NSLog statement:
  1. NSLog(@"In crunchCookie");  
Save the source file, and click “Build and Debug” again. Two of the three errors originally displayed should now be resolved.
Next, select the “No declaration of property” error. As you can see, this error is reporting that the property we are attempting to synthesize doesn’t exist. To verify this, open the FortuneCrunchViewController.h file where the property should have been declared. If you examine line 17, the syntax is correct, but we do have a mismatch between the property we have declared and the one we are attempting to synthesize. Objective-C is a case-sensitive language, meaning that the ‘C’ in cookie must be capitalized to match the property we are attempting to synthesize. Update the property declaration in the header file to read:
  1. @property(nonatomic, retain) IBOutlet *fortuneCookieButton;  
Save the source file and build and debug once again. This time, rather than opening the build results fromBuild > Build and Debug, simply click the error icon in the bottom right corner of Xcode.
One step forward, four steps back. The error regarding the synthesize property line is gone, but we have an entirely new list of errors. What happened?
This is a good time to take notice of the different phases being shown in the Build Results window:
Xcode Debugging - Figure 2 - Linking vs. Build Phase
Notice that we have one warning underneath the “Compile” section of the build results output. This is the same section that our previous errors were being reported in. Now that the previous three errors have been resolved, we have been able to progress from the compile phase to the linking phase of our application build, and all of the new errors are linking errors. When you encounter a linking error, it’s typically because you are trying to use functions from a framework that you haven’t actually included in your application. In this case, the Build Results are referencing a function called _UIApplicationMain in the main.o file. Main.o is the compiled, machine code version of main.m. Let’s take a look at the source code in that file. On line 13 you can see a function call to UIApplicationMain:
  1. int retVal = UIApplicationMain(argc, argv, nil, nil);  
UIApplicationMain is a central function to every iOS application, but how can you find out more about it and figure out what framework it is included within? Fortunately, the iOS SDK comes with some great documentation. If you hold down the option (or alt) button and double-click the function name, you will launch an abstract from the official iOS SDK documentation discussing this function. Click the “book” icon in the top right to view the full documentation available. You can see that doing so launched the function reference documentation for the UIKit framework. Bingo, we have our missing framework. However, before we add the framework to the project, let’s examine another method that you could have used for determining the origin of UIApplicationMain.
Close the documentation window. Now, hold down the command button and double-click theUIApplicationMain function. You are now looking at the source of UIApplication.h, the header declaration file that contains the UIApplicationMain function declaration. If you scroll to the top of the window, you will see that this file imports multiple other UIKit headers, and that the comment at the top includes the “UIKit” framework name.
Let’s move on to resolving these linking errors by including the UIKit framework. To do so, right click or control click on the Frameworks folder in the Groups & Files pane, and select add > existing frameworks. Find the UIKit framework and click “Add.” To test our work, select Build and Debug again.
As you can see, the simulator launched successfully and we are able to view our application. This means that we have resolved all of the compile-time errors in our application.
Go ahead and click the fortune cookie. . .as you can see, clicking the cookie results in a run-time error and the application has crashed. The message displayed in the bottom left of the Xcode screen isn’t very helpful, so let’s take a closer look by opening up the console.
Xcode Debugging - Figure 3 - Console Window
The console displays both a call stack of what was occurring in our program execution at the time of the crash, as well as a more detaild explanation: “Terminating app due to uncaught exception. . .FortuneCrunchViewController cookieCruncher: unrecognized selector sent to instance.” This message means that our button is calling the wrong selector for the event that we fired by clicking the cookie. Since the interface for FortuneCrunch was built in Interface Builder, let’s open the Interface Builder XIB file for “FortuneCrunchViewController” to take a closer look.
Select the cookie button and control click or right click to view a list of connected actions:
Xcode Debugging
You can see that the Touch Up Inside event is referencing a target that doesn’t exist, indicated by the yellow text. Remove the non-existent “cookieCruncher” target and reconnect touchUpInside to File’s Owner by selecting the “crunchCookie” target that appears in the drop down. Save your work in Interface Builder, switch back to Xcode, and relaunch the application.
Clicking the fortune cookie again results in a run-time error. This time, the console message isn’t so helpful, it just displays “EXC_BAD_ACCESS”.
Take another look at the build results by selecting Build > Build Results. Did you notice the warning earlier? Compiler warnings are often an indication of a potential run-time error, but because there is nothing incorrect with the actual syntax of the line the warning is issued for, the compiler is still able to build the application successfully. Of course, there are times when a compiler warning is a “false flag” and will not result in a run-time error, but upwards of 95% of the time, if the compiler has issued a warning you are doing something wrong.
Click on the warning to jump to the line in your source code where it occurred.
The warning is referring to incompatible pointer types. Do you see the problem? The imageNamed method expects an NSString object, but this line of code is supplying the method with a literal C style string. Add in the “@” symbol to make this an Objective-C string:
  1. [fortuneCookieButton setImage:[UIImage imageNamed:@"cookie-closed.png"] forState:UIControlStateNormal];  
Save your progress and run the application again.
This time, when you click the fortune cookie you encounter a logical error: the application doesn’t crash and the “Happy iPhone Hacking” label appears as expected, but the background image remains as the closed cookie.
To fix this, let’s take a look at the function responsible for the transition: (IBAction)crunchCookie. Line 19 is responsible for changing the background image and you can see that it is setting the new background image to “cookie-closed.png”. If you take a look at cookie-closed in the Resources folder, you’ll see that this is in fact the same image displayed when the app first loads. We need to change that line to transition to “cookie-crunched.png”:




  1. [fortuneCookieButton setImage:[UIImage imageNamed:@"cookie-crunched.png"] forState:UIControlStateNormal];  
Build and run the application again. . .and now tapping the cookie results in the expected background image with the label displayed properly.
Congratulations! You’ve just walked through the process of fixing compile-time errors, run-time errors, and logical errors in an application. All the while, we have barely tapped into the powerful debugging tools available to you with Xcode.
To continue our exploration of the more advanced debugging tools available, let’s try to extend the FortuneCrunch app to make it a bit more interesting. Rather than display the static string “Happy iPhone Hacking!” every time the cookie is crunched, let’s build an array of multiple NSString values that could be displayed.
Switch back to Xcode and open the FortuneCrunchViewController.h file. Add the following data member:
  1. NSArray *fortunes;  
This array will be used to hold our random fortune strings.
Now, add the following method signature:
  1. -(NSString *)generateRandomFortune;  
This line will declare a new method in our class that will be used to select a random fortune from our fortunes array.
Next, switch to FortuneCrunchViewController.m. Since this class will be initiated from our XIB file, we need to override the initWithCoder method and allocate the array we declared in the .h file, initializing it with some new fortunes:
  1. -(id)initWithCoder:aDecoder  
  2. {  
  3.     self = [super initWithCoder:aDecoder];  
  4.     if(self)  
  5.     {  
  6.         fortunes = [[NSArray alloc] initWithObjects:  
  7.                           @”He who throws dirt loses ground.”,  
  8.                           @”A closed mouth gathers no feet.”,  
  9.                           @”Help! I am a prisoner in a bakery!”, nil];  
  10.     }  
  11.     return self;  
  12. }  
Now that we’ve created a new NSArray, don’t forget to release it in the dealloc method:
  1. -(void)dealloc  
  2. {  
  3.     [fortunes release];  
Let’s move on to coding the generateRandomFortune function:
  1. -(NSString *)generateRandomFortune  
  2. {  
  3.     int chosen_index = arc4random() % 3 * 10;   
  4.   
  5.     return [fortunes objectAtIndex:chosen_index];  
  6. }  
These lines simply generate a new, random index number that we will use to return the corresponding fortune string.
Finally, modify the crunchCookie method to use one of our random fortunes rather than the static text “Happy iPhone Hacking!”:
  1. fortuneLabel.text = [self generateRandomFortune];  
Build and run the application after saving these changes. If you click the cookie, you will create a run-time error. To figure out why this is happening, we’re going to use the Xcode debugger and custom breakpoints.
A breakpoint is a flag that signals to your application that program execution should “pause” when the line with the breakpoint is reached. Running your application in “Build and Debug mode” allows you to use breakpoints. To set a breakpoint, simply click in the editor “gutter” on the line you would like to trigger a breakpoint. To figure out what’s happening in our application, we’re going to set our breakpoint on theNSLog line, just after the crunchCookie method is called:
Xcode Debugging - Figure 5 - Adding a Breakpoint
Build and debug the application with this new breakpoint in place.
After the application loads, click the cookie. If you look in the bottom left of Xcode, you’ll see the status message “Stopped at breakpoint 1”. This means the debugger has successfully stopped program execution at the breakpoint you set. You’ll also notice that a red arrow indicates the current line of execution where the debugger has “paused” the program.
So, what can you do with the debugger? More than can be covered in a single tutorial. However, there are three fundamental actions you can take at this point: Step over, step into, and step out. All of these options are available to you from the in-code debugger menu bar.
Xcode Debugging - Figure 6 - In-code Debugger Menu Bar
If you press the “step over” button on the in-code debugger menu, you’ll notice that program execution continues to the next line. “Step over” will simply continue execution one line at a time within the current method, but it won’t follow your code execution if it forks to another method. If you want to actually follow the code execution into other method calls in your code, you will need to use the “step into” button.
As you can see, step into has actually taken us into the generateRandomFortune method, which is exactly what we want. Click “Step over” again to see what happens when arc4random() is called. Wouldn’t it be nice if we knew what the chosen_index variable has just been set to? Fortunately, we can! One of the best features of using the debugger is the ability to simply mouse over variables to quickly see their value.
Clearly, the chosen_index value is much larger than the length of our array. Unlike in some other programming languages, the randomization function we are using will return an integer, so there is no need to convert from a decimal to an integer by multiplying the value by 10. Update the line to read:
  1. int chosen_index = arc4random() % 3;  
We’re done making modifications to this function, so use the “Step Out” button to exit this sub-function and return to crunchCookie. Note that even though we didn’t see it, the rest of the function executed as normal.
Finally, take note of the “Activate / Deactivate” breakpoint button and the “Continue Execution” button on the in-code debugger menu bar. “Continue Execution” will simply allow program execution to continue as normal. You can think of it as the “unpause” button. Go ahead and press this now.
Before we move on to turning off breakpoints, there is one more issue to tackle: what you have just experienced is called the “in-code debugger”. It’s very powerful, but there are also two other debugging modes available to you: the full debugger window and the mini-debugger perspective.
To access the full debugger window, click the “debugging” icon on the in-code debugger menubar. This window has significantly more information than the in-code debugger. On the left you have a stack-trace displaying the context of program execution (you also have the ability to select from any of the currently spawned threads). To the right, you can see a quick display of the various variables currently held in memory. Selecting a different call-stack signature will change your view in the Debugger. You can change the Debugger window layout by going to Run > Debugger Display.
Finally, the mini-debugger is yet another debugging perspective available to you. I rarely use this perspective, but it is available to you from Run > Mini-Debugger.
Since we just resolved the error introduced in our random fortune code, we no longer need the debugger to be on. Toggle off breakpoints. However, before we build the application again, let’s adjust the font size of our fortune label.
Open Interface Builder, select the label and change the font in the Inspector to Arial Black, 9 point, and then select the “Adjust to fit” box and change the minimum font size to 6 point. Now, build and run our project again.
Voila! Our application now functions as we intended.

Sumber : http://mobile.tutsplus.com/tutorials/iphone/xcode-debugging_iphone-sdk/